johannes                Sun Oct 19 12:22:49 2008 UTC

  Modified files:              
    /php-src/ext/mysqlnd        mysqlnd_ps.c 
  Log:
  Don't dereference NULL-pointer
  
http://cvs.php.net/viewvc.cgi/php-src/ext/mysqlnd/mysqlnd_ps.c?r1=1.20&r2=1.21&diff_format=u
Index: php-src/ext/mysqlnd/mysqlnd_ps.c
diff -u php-src/ext/mysqlnd/mysqlnd_ps.c:1.20 
php-src/ext/mysqlnd/mysqlnd_ps.c:1.21
--- php-src/ext/mysqlnd/mysqlnd_ps.c:1.20       Fri Sep 12 15:06:55 2008
+++ php-src/ext/mysqlnd/mysqlnd_ps.c    Sun Oct 19 12:22:49 2008
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: mysqlnd_ps.c,v 1.20 2008/09/12 15:06:55 andrey Exp $ */
+/* $Id: mysqlnd_ps.c,v 1.21 2008/10/19 12:22:49 johannes Exp $ */
 #include "php.h"
 #include "mysqlnd.h"
 #include "mysqlnd_wireprotocol.h"
@@ -966,13 +966,14 @@
        php_mysql_packet_row *row_packet = result->row_packet;
 
        DBG_ENTER("mysqlnd_fetch_stmt_row_cursor");
-       DBG_INF_FMT("stmt=%lu flags=%u", stmt->stmt_id, flags);
 
        if (!stmt) {
                DBG_ERR("no statement");
                DBG_RETURN(FAIL);
        }
 
+       DBG_INF_FMT("stmt=%lu flags=%u", stmt->stmt_id, flags);
+
        if (stmt->state < MYSQLND_STMT_USER_FETCHING) {
                /* Only initted - error */
                SET_CLIENT_ERROR(stmt->conn->error_info, 
CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE,



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

Reply via email to