php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52613
Patch mysqlnd-crash.patch revision 2010-08-15 15:45 UTC by manuel at mausz dot at

Patch mysqlnd-crash.patch for MySQL related Bug #52613

Patch version 2010-08-15 15:45 UTC

Return to Bug #52613 | Download this patch
Patch Revisions:

Developer: manuel@mausz.at

--- ext/mysqlnd/mysqlnd_result.c.orig	2010-07-13 15:02:00.000000000 +0200
+++ ext/mysqlnd/mysqlnd_result.c	2010-08-15 17:01:22.000000000 +0200
@@ -200,10 +200,13 @@
 			MYSQLND_MEMORY_POOL_CHUNK *current_buffer = set->row_buffers[row];
 			int col;
 
+			if (current_row == NULL || current_row[0] == NULL) {
+				break;/* row that was never initialized */
+			}
 			for (col = field_count - 1; col >= 0; --col) {
 				zend_bool copy_ctor_called;
-				if (current_row == NULL || current_row[0] == NULL) {
-					break;/* row that was never initialized */
+				if (current_row[col] == NULL) {
+					break;/* column that was never initialized */
 				}
 			mysqlnd_palloc_zval_ptr_dtor(&(current_row[col]), result->type, &copy_ctor_called TSRMLS_CC);
 #if MYSQLND_DEBUG_MEMORY
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 14 16:01:26 2024 UTC