version: Handle NULL puLen parameter for VerQueryValueA/W.
This commit is contained in:
parent
66662a87c0
commit
395289a30a
|
@ -976,7 +976,7 @@ BOOL WINAPI VerQueryValueA( LPCVOID pBlock, LPCSTR lpSubBlock,
|
||||||
len = WideCharToMultiByte(CP_ACP, 0, *lplpBuffer, -1,
|
len = WideCharToMultiByte(CP_ACP, 0, *lplpBuffer, -1,
|
||||||
lpBufferA + pos, info->wLength - pos, NULL, NULL);
|
lpBufferA + pos, info->wLength - pos, NULL, NULL);
|
||||||
*lplpBuffer = lpBufferA + pos;
|
*lplpBuffer = lpBufferA + pos;
|
||||||
*puLen = len;
|
if (puLen) *puLen = len;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1036,7 +1036,7 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
|
||||||
len = MultiByteToWideChar(CP_ACP, 0, *lplpBuffer, -1,
|
len = MultiByteToWideChar(CP_ACP, 0, *lplpBuffer, -1,
|
||||||
lpBufferW + pos, max/sizeof(WCHAR) - pos );
|
lpBufferW + pos, max/sizeof(WCHAR) - pos );
|
||||||
*lplpBuffer = lpBufferW + pos;
|
*lplpBuffer = lpBufferW + pos;
|
||||||
*puLen = len;
|
if (puLen) *puLen = len;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue