sesser          Fri Oct 27 08:33:55 2006 UTC

  Modified files:              (Branch: PHP_4_4)
    /php-src/ext/standard       var_unserializer.re 
  Log:
  Do not allow more than 65500 references
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/var_unserializer.re?r1=1.11.4.16.2.4&r2=1.11.4.16.2.5&diff_format=u
Index: php-src/ext/standard/var_unserializer.re
diff -u php-src/ext/standard/var_unserializer.re:1.11.4.16.2.4 
php-src/ext/standard/var_unserializer.re:1.11.4.16.2.5
--- php-src/ext/standard/var_unserializer.re:1.11.4.16.2.4      Sun Jan  1 
13:46:58 2006
+++ php-src/ext/standard/var_unserializer.re    Fri Oct 27 08:33:55 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: var_unserializer.re,v 1.11.4.16.2.4 2006/01/01 13:46:58 sniper Exp $ */
+/* $Id: var_unserializer.re,v 1.11.4.16.2.5 2006/10/27 08:33:55 sesser Exp $ */
 
 #include "php.h"
 #include "ext/standard/php_var.h"
@@ -353,6 +353,10 @@
        if (id == -1 || var_access(var_hash, id, &rval_ref) != SUCCESS) {
                return 0;
        }
+       
+       if ((*rval_ref)->refcount > 65500) {
+               return 0;
+       }
 
        if (*rval != NULL) {
        zval_ptr_dtor(rval);
@@ -377,6 +381,10 @@
        
        if (*rval == *rval_ref) return 0;
 
+       if ((*rval_ref)->refcount > 65500) {
+               return 0;
+       }
+
        if (*rval != NULL) {
        zval_ptr_dtor(rval);
        }

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

Reply via email to