Use of initialized value

Bug #1086078 reported by Marco Tizzoni
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
Fix Released
Medium
Frank

Bug Description

Running the agent in debug mode show this:

Use of uninitialized value $DATE in hex at /usr/lib/perl5/site_perl/5.10.0/Ocsinventory/Agent/Modules/Snmp/Host_Resources_Mib.pm line 54.
substr outside of string at /usr/lib/perl5/site_perl/5.10.0/Ocsinventory/Agent/Modules/Snmp/Host_Resources_Mib.pm line 54.

At row 54 the code check if $DATE is defined. As it turns out for some host it is defined but it is empty. I fixed it up adding at row 55 something like this:

if ( length($DATE) > 0) { ... }

Revision history for this message
Marco Tizzoni (marco-tizzoni) wrote :
Revision history for this message
Frank (frank-bourdeau) wrote :

Hi Marco,

Thanks for your return. We will integrate your patch.

Changed in ocsinventory-unix-agent:
importance: Undecided → Medium
assignee: nobody → Frank (frank-bourdeau)
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: New → Fix Committed
mortheres (mortheres)
Changed in ocsinventory-unix-agent:
milestone: none → 2.1rc1
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.