ntdll: Fix off-by-one allocation error.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47311
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-03 10:28:29 +02:00
parent 381c4e7b66
commit d96fd000d3
1 changed files with 1 additions and 1 deletions

View File

@ -2313,7 +2313,7 @@ static NTSTATUS find_builtin_dll( const WCHAR *name, WINE_MODREF **pwm,
len = strlenW( name );
if (build_dir) maxlen = strlen(build_dir) + sizeof("/programs/") + len;
for (i = 0; (path = wine_dll_enum_load_path( i )); i++) maxlen = max( maxlen, strlen(path) );
for (i = 0; (path = wine_dll_enum_load_path( i )); i++) maxlen = max( maxlen, strlen(path)+1 );
maxlen += len + sizeof(".so");
if (!(file = RtlAllocateHeap( GetProcessHeap(), 0, maxlen ))) return STATUS_NO_MEMORY;