cpw.malu.xmpp.jingle_ft: 1cdf3188: Only cancel sending when reason code is ...

Paul Aurich paul at darkrain42.org
Mon Apr 12 15:48:44 EDT 2010


On 2010-04-12 12:40, malu at pidgin.im wrote:
> ============================================================
> --- libpurple/protocols/jabber/jingle/file-transfer.c	a09ff11d9ff3b22e68e241c17a708011e7e6bc93
> +++ libpurple/protocols/jabber/jingle/file-transfer.c	0c4d77d100cebfbb3d558df3cbe0b7916110db5a
> @@ -792,14 +792,21 @@ jingle_file_transfer_handle_action_inter
>  			JingleSession *session = jingle_content_get_session(content);
>  			PurpleXfer *xfer = 
>  				jingle_file_transfer_get_xfer(content);
> -
> +			xmlnode *reason = xmlnode_get_child(xmlcontent, "reason");
> +			xmlnode *reason_code = reason->child;
> +			const gchar *reason_text =
> +				reason_code->type == XMLNODE_TYPE_TAG ? reason_code->name : NULL;
> +			

This looks like multiple NULL dereferences waiting to happen (no
"reason" tag, no child of "reason" tag)

~Paul

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://pidgin.im/pipermail/devel/attachments/20100412/1c785d9e/attachment.sig>


More information about the Devel mailing list