Skip Menu |

This queue is for tickets about the SNMP-Extension-PassPersist CPAN distribution.

Report information
The Basics
Id: 95264
Status: new
Priority: 0/
Queue: SNMP-Extension-PassPersist

People
Owner: Nobody in particular
Requestors: bilek [...] livesport.eu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: SNMP::Extension::PassPersist by_oid bug
Date: Fri, 02 May 2014 11:20:07 +0200
To: bug-SNMP-Extension-PassPersist [...] rt.cpan.org
From: Václav Bílek <bilek [...] livesport.eu>
Hello When you compare 2 OIDs but the second is shorter by_oid returns Use of uninitialized value in numeric comparison (<=>) at /usr/share/perl5/SNMP/Extension/PassPersist.pm line 530, <STDIN> line patch: 530c530,534 < $v ||= $a[$_] <=> $b[$_] for 0 .. $#a; --- Show quoted text
> my $i; > for ( $i=0; $i <= $#a; $i++ ) { > $v ||= $a[$i] <=> $b[$i]; > if ( $v != 0 || $#b == $i ){last}; > }
$v != 0 ... do not have to process whole @a the first difference makes result $#b == $i ... do not try to compare something vith nothing it makes problems when using snmpwalk while any error output from script makes snmpd restarting it. -- Václav Bílek senior systémový specialista e-mail: bilek@livesport.eu tel.: +420 731 157 263 LiveSport s.r.o. Bucharova 1314/8, Praha 5, 158 00 http://www.livesport.eu