[asterisk-commits] seanbright: branch 11 r373133 - in /branches/11: ./ main/manager.c

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


Author: seanbright
Date: Tue Sep 18 15:14:01 2012
New Revision: 373133

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373133
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

Modified:
    branches/11/   (props changed)
    branches/11/main/manager.c

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

Modified: branches/11/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/manager.c?view=diff&rev=373133&r1=373132&r2=373133
==============================================================================
--- branches/11/main/manager.c (original)
+++ branches/11/main/manager.c Tue Sep 18 15:14:01 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