From 92d30446251591a6805168f51a4b07ff65b3cc24 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 18 Dec 2012 01:24:33 +0000 Subject: Improved failure handling in jabber_si_handle_request(). If the imcb callback fails, we shouldn't try to continue the ft and dereference the NULL ptr it returned. --- protocols/jabber/si.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'protocols/jabber') diff --git a/protocols/jabber/si.c b/protocols/jabber/si.c index 4b0e57c4..f5f3b2fe 100644 --- a/protocols/jabber/si.c +++ b/protocols/jabber/si.c @@ -292,9 +292,11 @@ int jabber_si_handle_request( struct im_connection *ic, struct xt_node *node, st requestok = FALSE; } - *s = '/'; + if( s ) + *s = '/'; } - else + + if( !requestok ) { reply = jabber_make_error_packet( node, "item-not-found", "cancel", NULL ); if (!jabber_write_packet( ic, reply )) -- cgit v1.2.3