[In both of these cases, the situation being guarded against is:
check_password() is called, but soup_message_headers_get_one() does not find
an "Authorization" header. -smcv]
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Dan Winship <danw@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=669479
Bug-NB: NB#297634
char *decoded, *colon;
gsize len, plen;
- if (strncmp (header, "Basic ", 6) != 0)
+ if (!header || (strncmp (header, "Basic ", 6) != 0))
return FALSE;
decoded = (char *)g_base64_decode (header + 6, &len);
header = soup_message_headers_get_one (msg->request_headers,
"Authorization");
- if (strncmp (header, "Digest ", 7) != 0)
+ if (!header || (strncmp (header, "Digest ", 7) != 0))
return FALSE;
params = soup_header_parse_param_list (header + 7);