Author: jimtabor
Date: Fri Jul 25 07:26:22 2008
New Revision: 34774
URL:
http://svn.reactos.org/svn/reactos?rev=34774&view=rev
Log:
Check for null pointers, keep wine msg test from crashing.
Modified:
trunk/reactos/dll/win32/user32/windows/message.c
Modified: trunk/reactos/dll/win32/user32/windows/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Fri Jul 25 07:26:22
2008
@@ -1441,6 +1441,11 @@
MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
return (BOOL) -1;
}
+ if (!lpMsg)
+ {
+ SetLastError( ERROR_NOACCESS );
+ return FALSE;
+ }
*lpMsg = Conversion.AnsiMsg;
Conversion.Ansi = TRUE;
Conversion.FinalMsg = lpMsg;
@@ -1481,6 +1486,11 @@
{
return (BOOL) -1;
}
+ if (!lpMsg)
+ {
+ SetLastError( ERROR_NOACCESS );
+ return FALSE;
+ }
*lpMsg = Conversion.UnicodeMsg;
Conversion.Ansi = FALSE;
Conversion.FinalMsg = lpMsg;
@@ -1527,6 +1537,11 @@
MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg);
return (BOOL) -1;
}
+ if (!lpMsg)
+ {
+ SetLastError( ERROR_NOACCESS );
+ return FALSE;
+ }
*lpMsg = Conversion.AnsiMsg;
Conversion.Ansi = TRUE;
Conversion.FinalMsg = lpMsg;
@@ -1570,6 +1585,11 @@
{
return (BOOL) -1;
}
+ if (!lpMsg)
+ {
+ SetLastError( ERROR_NOACCESS );
+ return FALSE;
+ }
*lpMsg = Conversion.UnicodeMsg;
Conversion.Ansi = FALSE;
Conversion.FinalMsg = lpMsg;