From 90a9698f16f3063783305d292dbdff2c31ceaa0d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 26 May 2013 15:49:42 +0200 Subject: [PATCH] ver: curdirlen and destdirlen are in&out parameters (Coverity). --- dlls/ver.dll16/version.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/ver.dll16/version.c b/dlls/ver.dll16/version.c index 45b9277e00f..5e6692f7880 100644 --- a/dlls/ver.dll16/version.c +++ b/dlls/ver.dll16/version.c @@ -494,11 +494,23 @@ DWORD WINAPI VerFindFile16( UINT16 flags, LPSTR lpszFilename, LPSTR lpszDestDir, UINT16 *lpuDestDirLen ) { UINT curDirLen, destDirLen; - DWORD retv = VerFindFileA( flags, lpszFilename, lpszWinDir, lpszAppDir, - lpszCurDir, &curDirLen, lpszDestDir, &destDirLen ); + UINT *pcurDirLen = NULL, *pdestDirLen = NULL; + DWORD retv; - *lpuCurDirLen = (UINT16)curDirLen; - *lpuDestDirLen = (UINT16)destDirLen; + if (lpuCurDirLen) { + curDirLen = *lpuCurDirLen; + pcurDirLen = &curDirLen; + } + if (lpuDestDirLen) { + destDirLen = *lpuDestDirLen; + pdestDirLen = &destDirLen; + } + retv = VerFindFileA( flags, lpszFilename, lpszWinDir, lpszAppDir, + lpszCurDir, pcurDirLen, lpszDestDir, pdestDirLen ); + if (lpuCurDirLen) + *lpuCurDirLen = (UINT16)curDirLen; + if (lpuDestDirLen) + *lpuDestDirLen = (UINT16)destDirLen; return retv; } -- 2.11.4.GIT