From 395289a30a34608862be4617c979d43607c59e06 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Wed, 12 Nov 2014 00:03:59 -0200 Subject: [PATCH] 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 9bc6ad133a..58fd0294c3 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; }