[asterisk-commits] tilghman: branch tilghman/malloc_hold r209448 - /team/tilghman/malloc_hold/main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 28 21:32:11 CDT 2009
Author: tilghman
Date: Tue Jul 28 21:32:07 2009
New Revision: 209448
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=209448
Log:
Protect against NULL deref
Modified:
team/tilghman/malloc_hold/main/astmm.c
Modified: team/tilghman/malloc_hold/main/astmm.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tilghman/malloc_hold/main/astmm.c?view=diff&rev=209448&r1=209447&r2=209448
==============================================================================
--- team/tilghman/malloc_hold/main/astmm.c (original)
+++ team/tilghman/malloc_hold/main/astmm.c Tue Jul 28 21:32:07 2009
@@ -769,7 +769,7 @@
ast_mutex_lock(®lock);
- if (isfree) {
+ if (isfree && master) {
MPROTECT(master, sizeof(*master), PROT_READ);
ast_cli(fd, "Top item on the free list has a date of %d (now is %d) and it %s\n", master->freetime, (int) time(NULL), time(NULL) > master->freetime + HOLD_LENGTH ? "is already past due (BAD!)" : "hasn't expired yet");
}
More information about the asterisk-commits
mailing list