[asterisk-commits] mjordan: trunk r407752 - in /trunk: ./ main/security_events.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 7 14:17:53 CST 2014
Author: mjordan
Date: Fri Feb 7 14:17:50 2014
New Revision: 407752
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=407752
Log:
security_events: Fix assertion failure in dev-mode on optional IE parsing
When formatting an optional IE, the value is, of course, optional. As such, it
is entirely appropriate for ast_json_object_get to return NULL. If that occurs,
we now simply skip the IE that was requested, as it was not provided by the
entity that raised the event.
Thanks to George Joseph (gtjoseph) for catching this and reporting it in
#asterisk-dev
........
Merged revisions 407750 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/security_events.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: trunk/main/security_events.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/security_events.c?view=diff&rev=407752&r1=407751&r2=407752
==============================================================================
--- trunk/main/security_events.c (original)
+++ trunk/main/security_events.c Fri Feb 7 14:17:50 2014
@@ -391,7 +391,9 @@
const char *ie_type_key = ast_event_get_ie_type_name(ie_type);
struct ast_json *json_string = ast_json_object_get(json, ie_type_key);
- ast_assert(json_string != NULL);
+ if (!json_string) {
+ return 0;
+ }
if (ast_str_append(str, 0, "%s: %s\r\n", ie_type_key, S_OR(ast_json_string_get(json_string), "")) == -1) {
return -1;
More information about the asterisk-commits
mailing list