diff options
author | Josh Rickmar <jrick@devio.us> | 2012-05-10 16:09:43 -0400 |
---|---|---|
committer | Josh Rickmar <jrick@devio.us> | 2012-05-10 16:09:43 -0400 |
commit | 8a3a9a2ad2d50a4dc21a48f8a9366aa61c178ae4 (patch) | |
tree | c7684e997bf4d624d684a4e6f1f439b77a91c4c5 | |
parent | 628ff04bcb7200e66491cb5342d71ad04ffe4030 (diff) | |
download | xombrero-8a3a9a2ad2d50a4dc21a48f8a9366aa61c178ae4.tar.gz |
tld_get_suffix will return NULL on bad input. Don't pass this to
strcmp() unless we check for NULL first.
-rw-r--r-- | xxxterm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xxxterm.c b/xxxterm.c index 120637e..d8d7fe8 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -4420,7 +4420,8 @@ session_rq_cb(SoupSession *s, SoupMessage *msg, SoupSocket *socket, ref_suffix = tld_get_suffix(ref_uri->host); dest_suffix = tld_get_suffix(dest->host); - if (dest && strcmp(ref_suffix, dest_suffix) != 0) { + if (dest && ref_suffix && dest_suffix && + strcmp(ref_suffix, dest_suffix) != 0) { soup_message_headers_remove(msg->request_headers, "Referer"); DNPRINTF(XT_D_NAV, "session_rq_cb: removing " |