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
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ static WCHAR *build_dll_path( const WCHAR *arch, const WCHAR *name, const WCHAR
unsigned int len; unsigned int len;
if (!(path = build_assembly_name( arch, name, token, version, &len ))) return NULL; 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) ))) if (!(ret = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) )))
{ {
HeapFree( GetProcessHeap(), 0, path ); HeapFree( GetProcessHeap(), 0, path );