projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30db39b
)
- Prevent crashes when heapPtr is NULL, also fix broken heap magic output. Thanks...
author
Aleksey Bragin
<aleksey@reactos.org>
Wed, 2 Jul 2008 10:00:12 +0000
(10:00 +0000)
committer
Aleksey Bragin
<aleksey@reactos.org>
Wed, 2 Jul 2008 10:00:12 +0000
(10:00 +0000)
svn path=/trunk/; revision=34256
reactos/lib/rtl/heap.c
patch
|
blob
|
history
diff --git
a/reactos/lib/rtl/heap.c
b/reactos/lib/rtl/heap.c
index
2e9e832
..
8ffe604
100644
(file)
--- a/
reactos/lib/rtl/heap.c
+++ b/
reactos/lib/rtl/heap.c
@@
-335,7
+335,10
@@
static HEAP *HEAP_GetPtr(
HEAP *heapPtr = (HEAP *)heap;
if (!heapPtr || (heapPtr->magic != HEAP_MAGIC))
{
- ERR("Invalid heap %p, magic:%4s!\n", heap,heapPtr->magic );
+ if (heapPtr)
+ ERR("Invalid heap %p, magic:%.4s!\n", heap, &heapPtr->magic );
+ else
+ ERR("Invalid heap %p!\n", heap );
//KeDumpStackFrames(NULL);
return NULL;
}