mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fail as documented when the pointer to the buffer equals the pointer to the string to be converted in MultiByteToWideChar and WideCharToMultiByte
svn path=/trunk/; revision=17039
This commit is contained in:
parent
9912b90aff
commit
f89d9a13ad
1 changed files with 4 additions and 2 deletions
|
@ -745,7 +745,8 @@ MultiByteToWideChar(UINT CodePage, DWORD Flags,
|
|||
{
|
||||
/* Check the parameters. */
|
||||
if (MultiByteString == NULL ||
|
||||
(WideCharString == NULL && WideCharCount > 0))
|
||||
(WideCharString == NULL && WideCharCount > 0) ||
|
||||
(PVOID)MultiByteString == (PVOID)WideCharString)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
@ -823,7 +824,8 @@ WideCharToMultiByte(UINT CodePage, DWORD Flags,
|
|||
{
|
||||
/* Check the parameters. */
|
||||
if (WideCharString == NULL ||
|
||||
(MultiByteString == NULL && MultiByteCount > 0))
|
||||
(MultiByteString == NULL && MultiByteCount > 0) ||
|
||||
(PVOID)WideCharString == (PVOID)MultiByteString)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue