diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-21 00:39:45 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-21 00:39:45 +0000 |
commit | 699376f7c3b3d6aff18af0601fa1f1ac6c5a2892 (patch) | |
tree | 73fee00cdb64aa0b1971f8badc07d30e0f3eef64 /protocols/jabber/iq.c | |
parent | b8a491db597ba2d82cc8eddc727509197747f0d5 (diff) |
Read the from attribute from the main stanza, not the inside query. Also
fixing another potential NULL pointer dereference.
Diffstat (limited to 'protocols/jabber/iq.c')
-rw-r--r-- | protocols/jabber/iq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c index e3c77d3d..dfdc6887 100644 --- a/protocols/jabber/iq.c +++ b/protocols/jabber/iq.c @@ -659,8 +659,8 @@ xt_status jabber_iq_parse_features( struct im_connection *ic, struct xt_node *no struct jabber_buddy *bud; char *feature, *xmlns, *from; - if( !( c = xt_find_node( node->children, "query" ) ) || - !( from = xt_find_attr( c, "from" ) ) || + if( !( from = xt_find_attr( node, "from" ) ) || + !( c = xt_find_node( node->children, "query" ) ) || !( xmlns = xt_find_attr( c, "xmlns" ) ) || !( strcmp( xmlns, XMLNS_DISCO_INFO ) == 0 ) ) { |