#746648 libsnmp-extension-passpersist-perl: bug in by_oid sorting function

#746648#5
Date:
2014-05-02 10:00:30 UTC
From:
To:
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;
---

$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.

#746648#10
Date:
2014-05-02 10:20:54 UTC
From:
To:
Package: libsnmp-extension-passpersist-perl
Version: 0.07-1

the version in original post (Version: 0.07-3) was mistake