sas             Thu Oct  3 02:29:58 2002 EDT

  Modified files:              
    /php4/ext/session   session.c 
  Log:
  Use ZEND_SET_SYMBOL_WITH_LENGTH correctly (hopefully)
  
  It strikes me as awkward that a Zend API user needs to take care of 
  doing the engine's reference counting.
  
  This fixes a memory overrun in a testcase.  All ZEND_SET_* calls
  should be correct now.
  
  
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.327 php4/ext/session/session.c:1.328
--- php4/ext/session/session.c:1.327    Thu Oct  3 01:53:45 2002
+++ php4/ext/session/session.c  Thu Oct  3 02:29:58 2002
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: session.c,v 1.327 2002/10/03 05:53:45 sas Exp $ */
+/* $Id: session.c,v 1.328 2002/10/03 06:29:58 sas Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -624,7 +624,7 @@
                case HASH_KEY_IS_STRING:
                        zend_hash_find(&EG(symbol_table), str, str_len, (void **) 
&val);
                        if (val) {
-                               ZEND_SET_SYMBOL_WITH_LENGTH(ht, str, str_len, *val, 1, 
0);
+                               ZEND_SET_SYMBOL_WITH_LENGTH(ht, str, str_len, *val, 
+(*val)->refcount + 1 , 1);
                        }
                        break;
                case HASH_KEY_IS_LONG:



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

Reply via email to