https://git.reactos.org/?p=reactos.git;a=commitdiff;h=51c694274f3eef1fbb18a…
commit 51c694274f3eef1fbb18ac54794bb43eab333b4b
Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org>
AuthorDate: Tue Oct 3 21:51:46 2017 +0300
[RTL] find_string_index: name parameter may not be null terminated
---
sdk/lib/rtl/actctx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sdk/lib/rtl/actctx.c b/sdk/lib/rtl/actctx.c
index 3768f7201b..4cf9bbaa4b 100644
--- a/sdk/lib/rtl/actctx.c
+++ b/sdk/lib/rtl/actctx.c
@@ -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;