tony2001                Wed Mar  5 09:28:41 2008 UTC

  Modified files:              
    /php-src/ext/standard       dir.c 
  Log:
  fix memory corruption due to double destruction of default dir handle
  (detected by ext/standard/tests/dir/readdir_variation6.phpt)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/dir.c?r1=1.173&r2=1.174&diff_format=u
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.173 php-src/ext/standard/dir.c:1.174
--- php-src/ext/standard/dir.c:1.173    Thu Feb 28 14:16:14 2008
+++ php-src/ext/standard/dir.c  Wed Mar  5 09:28:41 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: dir.c,v 1.173 2008/02/28 14:16:14 felipe Exp $ */
+/* $Id: dir.c,v 1.174 2008/03/05 09:28:41 tony2001 Exp $ */
 
 /* {{{ includes/startup/misc */
 
@@ -283,9 +283,9 @@
 
        if (dirp->rsrc_id == DIRG(default_dir)) {
                php_set_default_dir(-1 TSRMLS_CC);
+       } else {
+               zend_list_delete(dirp->rsrc_id);
        }
-
-       zend_list_delete(dirp->rsrc_id);
 }
 /* }}} */
 



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

Reply via email to