mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[CRT] Fix parameter check for _memicmp on NT 6+
Fixes a crash in msvcrt_winetest:string
This commit is contained in:
parent
840dfdc3a1
commit
d4993c67cd
1 changed files with 13 additions and 0 deletions
|
@ -8,6 +8,19 @@ int
|
|||
CDECL
|
||||
_memicmp(const void *s1, const void *s2, size_t n)
|
||||
{
|
||||
if (NtCurrentPeb()->OSMajorVersion >= 6)
|
||||
{
|
||||
if (!s1 || !s2)
|
||||
{
|
||||
if (n != 0)
|
||||
{
|
||||
MSVCRT_INVALID_PMT(NULL, EINVAL);
|
||||
return _NLSCMPERROR;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (n != 0)
|
||||
{
|
||||
const unsigned char *p1 = s1, *p2 = s2;
|
||||
|
|
Loading…
Reference in a new issue