svn: /php/php-src/trunk/ext/snmp/ snmp.c
| From: | Boris Lytochkin | Date: | Sat, 05 Feb 2011 13:22:38 +0000 |
| Subject: | svn: /php/php-src/trunk/ext/snmp/ snmp.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-64506@lists.php.net to get a copy of this message | ||
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;