lytboris Sat, 05 Feb 2011 13:22:38 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=308046
Log: fix crash caused by incorrect offset altering Changed paths: U php/php-src/trunk/ext/snmp/snmp.c Modified: php/php-src/trunk/ext/snmp/snmp.c =================================================================== --- php/php-src/trunk/ext/snmp/snmp.c 2011-02-05 13:01:10 UTC (rev 308045) +++ php/php-src/trunk/ext/snmp/snmp.c 2011-02-05 13:22:38 UTC (rev 308046) @@ -843,7 +843,7 @@ vars = vars->next_variable, count++); if (st & (SNMP_CMD_GET | SNMP_CMD_GETNEXT) && response->errstat == SNMP_ERR_TOOBIG && objid_set->step > 1) { /* Answer will not fit into single packet */ - objid_set->offset -= objid_set->step; + objid_set->offset = ((objid_set->offset > objid_set->step) ? (objid_set->offset - objid_set->step) : 0 ); objid_set->step /= 2; snmp_free_pdu(response); keepwalking = 1;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php