projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Check to make sure pointer isnt null after allocation. Fixes bug 1103.
[reactos.git]
/
reactos
/
lib
/
kernel32
/
misc
/
errormsg.c
diff --git
a/reactos/lib/kernel32/misc/errormsg.c
b/reactos/lib/kernel32/misc/errormsg.c
index
1862cdc
..
a1fba62
100644
(file)
--- a/
reactos/lib/kernel32/misc/errormsg.c
+++ b/
reactos/lib/kernel32/misc/errormsg.c
@@
-177,6
+177,10
@@
DWORD WINAPI FormatMessageA(
if (dwFlags & FORMAT_MESSAGE_FROM_STRING)
{
from = HeapAlloc( GetProcessHeap(), 0, strlen((LPCSTR)lpSource)+1 );
+ if (form == NULL)
+ {
+ return 0;
+ }
strcpy( from, (LPCSTR)lpSource );
}
else {