mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
- Fix condition when lParam is null and not allow it to go into exception.
svn path=/trunk/; revision=60865
This commit is contained in:
parent
745c57ba70
commit
60dada364b
|
@ -174,7 +174,14 @@ MsgMemorySize(PMSGMEMORY MsgMemoryEntry, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
else if (MMS_SIZE_LPARAMSZ == MsgMemoryEntry->Size)
|
else if (MMS_SIZE_LPARAMSZ == MsgMemoryEntry->Size)
|
||||||
{
|
{
|
||||||
Size = (UINT) ((wcslen((PWSTR) lParam) + 1) * sizeof(WCHAR));
|
// WM_SETTEXT and WM_SETTINGCHANGE can be null!
|
||||||
|
if (!lParam)
|
||||||
|
{
|
||||||
|
TRACE("lParam is NULL!\n");
|
||||||
|
Size = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Size = (UINT) ((wcslen((PWSTR) lParam) + 1) * sizeof(WCHAR));
|
||||||
}
|
}
|
||||||
else if (MMS_SIZE_SPECIAL == MsgMemoryEntry->Size)
|
else if (MMS_SIZE_SPECIAL == MsgMemoryEntry->Size)
|
||||||
{
|
{
|
||||||
|
@ -436,6 +443,7 @@ CopyMsgToKernelMem(MSG *KernelModeMsg, MSG *UserModeMsg, PMSGMEMORY MsgMemoryEnt
|
||||||
/* Copy data if required */
|
/* Copy data if required */
|
||||||
if (0 != (MsgMemoryEntry->Flags & MMS_FLAG_READ))
|
if (0 != (MsgMemoryEntry->Flags & MMS_FLAG_READ))
|
||||||
{
|
{
|
||||||
|
TRACE("Copy Message %d from usermode buffer\n", KernelModeMsg->message);
|
||||||
Status = MmCopyFromCaller(KernelMem, (PVOID) UserModeMsg->lParam, Size);
|
Status = MmCopyFromCaller(KernelMem, (PVOID) UserModeMsg->lParam, Size);
|
||||||
if (! NT_SUCCESS(Status))
|
if (! NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue