Steven Edwards : version: VerQueryValueA/W NULL pointer check.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 27 07:34:38 CDT 2007


Module: wine
Branch: master
Commit: e1347ecdc5a588a41c7cd5864e39ca13c65da4fc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e1347ecdc5a588a41c7cd5864e39ca13c65da4fc

Author: Steven Edwards <winehacker at gmail.com>
Date:   Thu Jul 26 15:42:16 2007 -0400

version: VerQueryValueA/W NULL pointer check.

---

 dlls/version/info.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/version/info.c b/dlls/version/info.c
index 82ca86f..907cd23 100644
--- a/dlls/version/info.c
+++ b/dlls/version/info.c
@@ -771,6 +771,9 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
     TRACE("(%p,%s,%p,%p)\n",
                 pBlock, debugstr_a(lpSubBlock), lplpBuffer, puLen );
 
+     if (!pBlock)
+        return FALSE;
+
     if ( !VersionInfoIs16( info ) )
     {
         BOOL ret;
@@ -823,6 +826,9 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
     TRACE("(%p,%s,%p,%p)\n",
                 pBlock, debugstr_w(lpSubBlock), lplpBuffer, puLen );
 
+    if (!pBlock)
+        return FALSE;
+
     if ( VersionInfoIs16( info ) )
     {
         BOOL ret;




More information about the wine-cvs mailing list