diff options
author | dequis <dx@dxzone.com.ar> | 2016-08-23 21:02:20 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-08-23 21:02:20 -0300 |
commit | 2dc394c7b0d7dfec1e0a7f553d3510c5efa98086 (patch) | |
tree | 764d16f17db56ac17395dfed5df4db069d01c25e /protocols | |
parent | 88cde4e8a6278c44048c4f454471d3aac724f9b7 (diff) |
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
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/jabber/jabber_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c index c3c9df34..ee4753f2 100644 --- a/protocols/jabber/jabber_util.c +++ b/protocols/jabber/jabber_util.c @@ -314,6 +314,10 @@ int jabber_compare_jid(const char *jid1, const char *jid2) { int i; + if (!jid1 || !jid2) { + return FALSE; + } + for (i = 0;; i++) { if (jid1[i] == '\0' || jid1[i] == '/' || jid2[i] == '\0' || jid2[i] == '/') { if ((jid1[i] == '\0' || jid1[i] == '/') && (jid2[i] == '\0' || jid2[i] == '/')) { |