[asterisk-commits] russell: branch 1.4 r45999 - /branches/1.4/res/res_jabber.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Oct 23 10:07:46 MST 2006


Author: russell
Date: Mon Oct 23 12:07:45 2006
New Revision: 45999

URL: http://svn.digium.com/view/asterisk?rev=45999&view=rev
Log:
don't crash when an incoming message has no "from" (issue #8205, jmls)

Modified:
    branches/1.4/res/res_jabber.c

Modified: branches/1.4/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_jabber.c?rev=45999&r1=45998&r2=45999&view=diff
==============================================================================
--- branches/1.4/res/res_jabber.c (original)
+++ branches/1.4/res/res_jabber.c Mon Oct 23 12:07:45 2006
@@ -1099,7 +1099,8 @@
 		insert->message = ast_strdup(iks_find_cdata(pak->x, "body"));
 	if(pak->id)
 		ast_copy_string(insert->id, pak->id, sizeof(insert->message));
-	insert->from = ast_strdup(pak->from->full);
+	if (pak->from)
+		insert->from = ast_strdup(pak->from->full);
 	AST_LIST_LOCK(&client->messages);
 	AST_LIST_TRAVERSE_SAFE_BEGIN(&client->messages, tmp, list) {
 		if (flag) {



More information about the asterisk-commits mailing list