mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[CRT] Add parameter check to _mbscmp
Fixes crash in msvcrt_winetest::string
This commit is contained in:
parent
86f98baaf8
commit
840dfdc3a1
1 changed files with 4 additions and 0 deletions
|
@ -1,10 +1,14 @@
|
||||||
#include <mbstring.h>
|
#include <mbstring.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <precomp.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
int _mbscmp(const unsigned char *str1, const unsigned char *str2)
|
int _mbscmp(const unsigned char *str1, const unsigned char *str2)
|
||||||
{
|
{
|
||||||
|
if (!MSVCRT_CHECK_PMT(str1 && str2))
|
||||||
|
return _NLSCMPERROR;
|
||||||
|
|
||||||
return strcmp((const char*)str1, (char*)str2);
|
return strcmp((const char*)str1, (char*)str2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue