iliaa           Sun May 31 14:14:08 2009 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/snmp   snmp.c 
    /php-src    NEWS 
  Log:
  
  MFB: Fixed bug #48359 (Script hangs on snmprealwalk if OID is not
  increasing)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/snmp/snmp.c?r1=1.106.2.2.2.8&r2=1.106.2.2.2.9&diff_format=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.106.2.2.2.8 
php-src/ext/snmp/snmp.c:1.106.2.2.2.9
--- php-src/ext/snmp/snmp.c:1.106.2.2.2.8       Wed Dec 31 11:17:43 2008
+++ php-src/ext/snmp/snmp.c     Sun May 31 14:14:07 2009
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: snmp.c,v 1.106.2.2.2.8 2008/12/31 11:17:43 sebastian Exp $ */
+/* $Id: snmp.c,v 1.106.2.2.2.9 2009/05/31 14:14:07 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -490,9 +490,14 @@
                                        if (st >= SNMP_CMD_WALK && st != 
SNMP_CMD_SET) {
                                                if (vars->type != 
SNMP_ENDOFMIBVIEW && 
                                                        vars->type != 
SNMP_NOSUCHOBJECT && vars->type != SNMP_NOSUCHINSTANCE) {
-                                                       memmove((char *)name, 
(char *)vars->name,vars->name_length * sizeof(oid));
-                                                       name_length = 
vars->name_length;
-                                                       keepwalking = 1;
+                                                       if 
(snmp_oid_compare(name, name_length, vars->name, vars->name_length) >= 0) {
+                                                               
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error: OID not increasing: 
%s",name);
+                                                               keepwalking = 0;
+                                                       } else {
+                                                               memmove((char 
*)name, (char *)vars->name,vars->name_length * sizeof(oid));
+                                                               name_length = 
vars->name_length;
+                                                               keepwalking = 1;
+                                                       }
                                                }
                                        }
                                }       
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1534&r2=1.2027.2.547.2.1535&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1534 php-src/NEWS:1.2027.2.547.2.1535
--- php-src/NEWS:1.2027.2.547.2.1534    Sat May 30 16:42:50 2009
+++ php-src/NEWS        Sun May 31 14:14:07 2009
@@ -10,9 +10,12 @@
   arguments). (Arnaud)
 - Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg 
   files). (Pierre)
+- Fixed bug #48359 (Script hangs on snmprealwalk if OID is not
+  increasing). (Ilia, simonov at gmail dot com)
 - Fixed bug #42143 (The constant NAN is reported as 0 on Windows)
   (Kanwaljeet Singla, Venkat Raman Don)
 
+
 27 May 2009, PHP 5.2.10RC1
 - Updated timezone database to version 2009.8 (2009h) (Derick)
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to