1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

sxs: Fix off by 1 error when allocating memory.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2020-10-03 10:57:13 +03:00 committed by Alexandre Julliard
parent 649072d1c8
commit 9ba6e5c2ab

View File

@ -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 );