Bruno Jesus : version: Handle NULL puLen parameter for VerQueryValueA/W.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Nov 12 09:33:53 CST 2014
Module: wine
Branch: master
Commit: 395289a30a34608862be4617c979d43607c59e06
URL: http://source.winehq.org/git/wine.git/?a=commit;h=395289a30a34608862be4617c979d43607c59e06
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Wed Nov 12 00:03:59 2014 -0200
version: Handle NULL puLen parameter for VerQueryValueA/W.
---
dlls/version/version.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/version/version.c b/dlls/version/version.c
index 9bc6ad1..58fd029 100644
--- a/dlls/version/version.c
+++ b/dlls/version/version.c
@@ -976,7 +976,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
len = WideCharToMultiByte(CP_ACP, 0, *lplpBuffer, -1,
lpBufferA + pos, info->wLength - pos, NULL, NULL);
*lplpBuffer = lpBufferA + pos;
- *puLen = len;
+ if (puLen) *puLen = len;
}
return ret;
}
@@ -1036,7 +1036,7 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
len = MultiByteToWideChar(CP_ACP, 0, *lplpBuffer, -1,
lpBufferW + pos, max/sizeof(WCHAR) - pos );
*lplpBuffer = lpBufferW + pos;
- *puLen = len;
+ if (puLen) *puLen = len;
}
return ret;
}
More information about the wine-cvs
mailing list