[asterisk-commits] seanbright: trunk r373134 - in /trunk: ./ main/manager.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 18 15:14:37 CDT 2012


Author: seanbright
Date: Tue Sep 18 15:14:33 2012
New Revision: 373134

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373134
Log:
Don't crash when passing a NULL message to __astman_get_header.

Before this commit, __astman_get_header would blindly dereference the passed in
'struct message *' to traverse the header list.  There are cases, however, such
as '*CLI> sip qualify peer foo' where the message pointer is NULL, so we need
to check for that.
........

Merged revisions 373131 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 373132 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 373133 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    trunk/   (props changed)
    trunk/main/manager.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=373134&r1=373133&r2=373134
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Tue Sep 18 15:14:33 2012
@@ -1934,6 +1934,10 @@
 {
 	int x, l = strlen(var);
 	const char *result = "";
+
+	if (!m) {
+		return result;
+	}
 
 	for (x = 0; x < m->hdrcount; x++) {
 		const char *h = m->headers[x];




More information about the asterisk-commits mailing list