Dmitry Timoshkov : sxs: Fix off by 1 error when allocating memory.
Alexandre Julliard
julliard at winehq.org
Mon Oct 5 15:54:56 CDT 2020
Module: wine
Branch: master
Commit: 9ba6e5c2ab4c4d113e9d98454afcdfd9fc30dbf5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=9ba6e5c2ab4c4d113e9d98454afcdfd9fc30dbf5
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Sat Oct 3 10:57:13 2020 +0300
sxs: Fix off by 1 error when allocating memory.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/sxs/cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/sxs/cache.c b/dlls/sxs/cache.c
index bb203f50c0..0acf012032 100644
--- a/dlls/sxs/cache.c
+++ b/dlls/sxs/cache.c
@@ -129,7 +129,7 @@ static WCHAR *build_dll_path( const WCHAR *arch, const WCHAR *name, const WCHAR
unsigned int len;
if (!(path = build_assembly_name( arch, name, token, version, &len ))) return NULL;
- len += build_sxs_path( sxsdir ) + 1;
+ len += build_sxs_path( sxsdir ) + 2;
if (!(ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
{
HeapFree( GetProcessHeap(), 0, path );
More information about the wine-cvs
mailing list