Blame SOURCES/wget-1.14-digest-auth-qop-segfault-fix.patch
|
|
226bdc |
diff --git a/src/http.c b/src/http.c
|
|
|
226bdc |
index 5ee1c93..b45c404 100644
|
|
|
226bdc |
--- a/src/http.c
|
|
|
226bdc |
+++ b/src/http.c
|
|
|
226bdc |
@@ -3728,7 +3728,7 @@ digest_authentication_encode (const char *au, const char *user,
|
|
|
226bdc |
md5_finish_ctx (&ctx, hash);
|
|
|
226bdc |
dump_hash (a2buf, hash);
|
|
|
226bdc |
|
|
|
226bdc |
- if (!strcmp(qop,"auth"))
|
|
|
226bdc |
+ if (qop && !strcmp(qop,"auth"))
|
|
|
226bdc |
{
|
|
|
226bdc |
/* RFC 2617 Digest Access Authentication */
|
|
|
226bdc |
/* generate random hex string */
|
|
|
226bdc |
@@ -3776,7 +3776,7 @@ digest_authentication_encode (const char *au, const char *user,
|
|
|
226bdc |
|
|
|
226bdc |
res = xmalloc (res_size);
|
|
|
226bdc |
|
|
|
226bdc |
- if (!strcmp(qop,"auth"))
|
|
|
226bdc |
+ if (qop && !strcmp (qop, "auth"))
|
|
|
226bdc |
{
|
|
|
226bdc |
snprintf (res, res_size, "Digest "\
|
|
|
226bdc |
"username=\"%s\", realm=\"%s\", nonce=\"%s\", uri=\"%s\", response=\"%s\""\
|