diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2012-12-18 01:24:33 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2012-12-18 01:24:33 +0000 | 
| commit | 92d30446251591a6805168f51a4b07ff65b3cc24 (patch) | |
| tree | d89f91397085c5af06bbddc9b7c86d1fb6e1e048 /protocols | |
| parent | 3bda2c2bc34fa21ef143f068a4f4f3feb7eb48d5 (diff) | |
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.
Diffstat (limited to 'protocols')
| -rw-r--r-- | protocols/jabber/si.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| 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 )) | 
