php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51606
Patch odbc_result_long_memory_leak_fix revision 2010-04-19 19:57 UTC by arobins at csg dot uwaterloo dot ca

Patch odbc_result_long_memory_leak_fix for ODBC related Bug #51606

Patch version 2010-04-19 19:57 UTC

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

Developer: arobins@csg.uwaterloo.ca

Index: ext/odbc/php_odbc.c
===================================================================
--- ext/odbc/php_odbc.c	(revision 298185)
+++ ext/odbc/php_odbc.c	(working copy)
@@ -1880,6 +1880,8 @@
 			} else if (rc == SQL_NO_DATA_FOUND) {
 				efree(field);
 				RETURN_FALSE;
+			} else if (rc == SQL_SUCCESS) {
+				field = erealloc(field, result->values[field_ind].vallen);
 			}
 			/* Reduce fieldlen by 1 if we have char data. One day we might 
 			   have binary strings... */
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 02:01:29 2024 UTC