ntdll: avoid buffer overrun in lookup_manifest_file

Alexandre Julliard julliard at winehq.org
Mon Oct 17 10:39:32 CDT 2011


Dan Kegel <dank at kegel.com> writes:

> @@ -1877,7 +1877,7 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
>              if (build == min_build && revision < min_revision) continue;
>              tmp = strchrW(tmp, '_') + 1;
>              tmp = strchrW(tmp, '_') + 1;
> -            if (!strcmpiW( tmp, wine_trailerW ))
> +            if (!strncmpiW( tmp, wine_trailerW, dir_info->FileNameLength/sizeof(WCHAR) - (tmp - dir_info->FileName) ))

That doesn't do the same thing.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list