[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-cvs
Subject:    [PHP-CVS] cvs: php-src(PHP_5_1) /ext/mysqli mysqli_api.c
From:       "Andrey Hristov" <andrey () php ! net>
Date:       2005-11-30 11:35:03
Message-ID: cvsandrey1133350503 () cvsserver
[Download RAW message or body]

andrey		Wed Nov 30 06:35:03 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/mysqli	mysqli_api.c 
  Log:
  fix a crash and a leak.
  4.1.15 (client) -> 5.x (server) because of the incompatibility because of
  decimal in the protocol binding may fail. Don't close the statement in
  that case because subsequent ->execute() will crash or any other function
  that will try to use already freed (and in debug mode thrashed) pointer.
  #probably more problems exist because of the 4.1.x -> 5.x protocol
  #incompatibility
  
  
http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.118.2.6&r2=1.118.2.7&ty=u
                
Index: php-src/ext/mysqli/mysqli_api.c
diff -u php-src/ext/mysqli/mysqli_api.c:1.118.2.6 \
                php-src/ext/mysqli/mysqli_api.c:1.118.2.7
--- php-src/ext/mysqli/mysqli_api.c:1.118.2.6	Tue Nov  8 08:50:50 2005
+++ php-src/ext/mysqli/mysqli_api.c	Wed Nov 30 06:35:03 2005
@@ -15,7 +15,7 @@
   | Author: Georg Richter <georg@php.net>                                |
   +----------------------------------------------------------------------+
 
-  $Id: mysqli_api.c,v 1.118.2.6 2005/11/08 13:50:50 andrey Exp $ 
+  $Id: mysqli_api.c,v 1.118.2.7 2005/11/30 11:35:03 andrey Exp $ 
 */
 
 #ifdef HAVE_CONFIG_H
@@ -354,7 +354,9 @@
 	if (rc) {
 		efree(bind);
 		efree(args);
-		php_clear_stmt_bind(stmt);
+                /* dont close the statement or subsequent usage (for example \
->execute()) will lead to crash */ +                efree(stmt->result.buf);
+                efree(stmt->result.is_null);
 		RETURN_FALSE;
 	}
 

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic