wez Thu Dec 18 06:16:17 2003 EDT
Modified files:
/php-src/win32 winutil.c
Log:
make sure this is initialized to NULL as we don't check the return
value of the FormatMessage function; we could end up using a stale
pointer.
Index: php-src/win32/winutil.c
diff -u php-src/win32/winutil.c:1.12 php-src/win32/winutil.c:1.13
--- php-src/win32/winutil.c:1.12 Thu Dec 18 06:05:20 2003
+++ php-src/win32/winutil.c Thu Dec 18 06:16:16 2003
@@ -26,9 +26,11 @@
/* leak for now */
if (buf) {
free(buf);
- buf = NULL;
}
#endif
+
+ buf = NULL;
+
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&buf,
0, NULL
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php