Changeset 2dc394c


Ignore:
Timestamp:
2016-08-24T00:02:20Z (8 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
67ea361
Parents:
88cde4e
Message:

jabber: handle nulls in jabber_compare_jid

As far as I can see this isn't remotely exploitable (and if it were it
would be just DoS of the child process), but i'm still looking into it

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber_util.c

    r88cde4e r2dc394c  
    315315        int i;
    316316
     317        if (!jid1 || !jid2) {
     318                return FALSE;
     319        }
     320
    317321        for (i = 0;; i++) {
    318322                if (jid1[i] == '\0' || jid1[i] == '/' || jid2[i] == '\0' || jid2[i] == '/') {
  • tests/check_jabber_util.c

    r88cde4e r2dc394c  
    103103        fail_unless(jabber_compare_jid("bugtest@google.com/A", "bugtest@google.com/A"));
    104104        fail_if(jabber_compare_jid("", "bugtest@google.com/A"));
     105        fail_if(jabber_compare_jid(NULL, ""));
     106        fail_if(jabber_compare_jid("", NULL));
    105107}
    106108
Note: See TracChangeset for help on using the changeset viewer.