[PATCH] cabinet: Avoid calling strlen on a constant
Alex Henrie
alexhenrie24 at gmail.com
Tue Feb 5 00:12:06 CST 2019
Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
dlls/cabinet/cabinet_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/cabinet/cabinet_main.c b/dlls/cabinet/cabinet_main.c
index 8af0fb1e6d..8adcb71c9e 100644
--- a/dlls/cabinet/cabinet_main.c
+++ b/dlls/cabinet/cabinet_main.c
@@ -194,8 +194,7 @@ static INT_PTR CDECL fdi_notify_extract(FDINOTIFICATIONTYPE fdint, PFDINOTIFICAT
HANDLE hFile = 0;
DWORD dwSize;
- dwSize = lstrlenA(pDestination->Destination) +
- lstrlenA("\\") + lstrlenA(pfdin->psz1) + 1;
+ dwSize = lstrlenA(pDestination->Destination) + lstrlenA(pfdin->psz1) + 2;
szFullPath = HeapAlloc(GetProcessHeap(), 0, dwSize);
lstrcpyA(szFullPath, pDestination->Destination);
--
2.20.1
More information about the wine-devel
mailing list