cvs: php-src /win32 winutil.c

From: Date: Thu, 18 Dec 2003 11:16:17 +0000
Subject: cvs: php-src /win32 winutil.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-25278@lists.php.net to get a copy of this message
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

« previous php.cvs (#25278) next »