mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[RTL] find_string_index: name parameter may not be null terminated
This commit is contained in:
@@ -3222,7 +3222,8 @@ static struct string_index *find_string_index(const struct strsection_header *se
|
||||
{
|
||||
const WCHAR *nameW = (WCHAR*)((BYTE*)section + iter->name_offset);
|
||||
|
||||
if (!strcmpiW(nameW, name->Buffer))
|
||||
if (!_wcsnicmp(nameW, name->Buffer, name->Length / sizeof(WCHAR)) &&
|
||||
wcslen(nameW) == name->Length / sizeof(WCHAR))
|
||||
{
|
||||
index = iter;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user