[cups.bugs] [LOW] STR #3517: Segmentation fault in cups/auth.c when debugging
Christer Bernérus
bernerus at chalmers.se
Wed Mar 3 04:28:37 PST 2010
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
When compiled with debugging, a segmentation fault may occur in auth.c
because a DEBUG_printf statements uses a possibly NULL http pointer.
Fix:
--- cups/auth.c (revision 9014)
+++ cups/auth.c (working copy)
@@ -98,13 +98,15 @@
DEBUG_printf(("cupsDoAuthentication(http=%p, method=\"%s\",
resource=\"%s\")",
http, method, resource));
+ if (!http)
+ http = _cupsConnect();
+
DEBUG_printf(("2cupsDoAuthentication: digest_tries=%d,
userpass=\"%s\"",
http->digest_tries, http->userpass));
+
DEBUG_printf(("2cupsDoAuthentication: WWW-Authenticate=\"%s\"",
httpGetField(http, HTTP_FIELD_WWW_AUTHENTICATE)));
- if (!http)
- http = _cupsConnect();
if (!http || !method || !resource)
return (-1);
Link: http://www.cups.org/str.php?L3517
Version: 1.4.2
More information about the cups
mailing list