Index: html.c =================================================================== --- html.c (revision 5547) +++ html.c (working copy) @@ -175,7 +175,8 @@ { (void)prompt; - fprintf(stderr, "DEBUG: cgi_null_passwd(prompt=\"%s\") called!\n", prompt); + fprintf(stderr, "DEBUG: cgi_null_passwd(prompt=\"%s\") called!\n", + prompt ? prompt : "(null)"); return (NULL); } Index: printers.c =================================================================== --- printers.c (revision 5547) +++ printers.c (working copy) @@ -331,7 +331,7 @@ fprintf(stderr, "DEBUG: show_all_printers(http=%p, user=\"%s\")\n", - http, user); + http, user ? user : "(null)"); /* * Show the standard header... @@ -543,7 +543,7 @@ fprintf(stderr, "DEBUG: show_printer(http=%p, printer=\"%s\")\n", - http, printer); + http, printer ? printer : "(null)"); /* * Build an IPP_GET_PRINTER_ATTRIBUTES request, which requires the following Index: template.c =================================================================== --- template.c (revision 5547) +++ template.c (working copy) @@ -60,7 +60,7 @@ fprintf(stderr, "DEBUG: cgiCopyTemplateFile(out=%p, tmpl=\"%s\")\n", out, - tmpl); + tmpl ? tmpl : "(null)"); /* * Open the template file... @@ -69,7 +69,7 @@ if ((in = fopen(tmpl, "r")) == NULL) { fprintf(stderr, "ERROR: Unable to open template file \"%s\" - %s\n", - tmpl, strerror(errno)); + tmpl ? tmpl : "(null)", strerror(errno)); return; } @@ -102,7 +102,8 @@ FILE *in; /* Input file */ - fprintf(stderr, "DEBUG: cgiCopyTemplateLang(tmpl=\"%s\")\n", tmpl); + fprintf(stderr, "DEBUG: cgiCopyTemplateLang(tmpl=\"%s\")\n", + tmpl ? tmpl : "(null)"); /* * Convert the language to a locale name... Index: ipp-var.c =================================================================== --- ipp-var.c (revision 5547) +++ ipp-var.c (working copy) @@ -774,7 +774,7 @@ fprintf(stderr, "DEBUG2: cgiSetIPPObjectVars(obj=%p, prefix=\"%s\", " "element=%d)\n", - obj, prefix, element); + obj, prefix ? prefix : "(null)", element); /* * Set common CGI template variables... @@ -977,7 +977,9 @@ fprintf(stderr, "DEBUG2: cgiSetIPPVars(response=%p, filter_name=\"%s\", " "filter_value=\"%s\", prefix=\"%s\", parent_el=%d)\n", - response, filter_name, filter_value, prefix, parent_el); + response, filter_name ? filter_name : "(null)", + filter_value ? filter_value : "(null)", + prefix ? prefix : "(null)", parent_el); /* * Set common CGI template variables... Index: help.c =================================================================== --- help.c (revision 5547) +++ help.c (working copy) @@ -187,7 +187,8 @@ topic = cgiGetVariable("TOPIC"); si = helpSearchIndex(hi, query, topic, helpfile); - fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n", query, topic); + fprintf(stderr, "DEBUG: query=\"%s\", topic=\"%s\"\n", + query ? query : "(null)", topic ? topic : "(null)"); if (si) { Index: admin.c =================================================================== --- admin.c (revision 5547) +++ admin.c (working copy) @@ -93,7 +93,8 @@ if (!http) { perror("ERROR: Unable to connect to cupsd"); - fprintf(stderr, "DEBUG: cupsServer()=\"%s\"\n", cupsServer()); + fprintf(stderr, "DEBUG: cupsServer()=\"%s\"\n", + cupsServer() ? cupsServer() : "(null)"); fprintf(stderr, "DEBUG: ippPort()=%d\n", ippPort()); fprintf(stderr, "DEBUG: cupsEncryption()=%d\n", cupsEncryption()); exit(1); @@ -534,8 +535,9 @@ }; + ptr = cgiGetVariable("DEVICE_URI"); fprintf(stderr, "DEBUG: do_am_printer: DEVICE_URI=\"%s\"\n", - cgiGetVariable("DEVICE_URI")); + ptr ? ptr : "(null)"); title = cgiText(modify ? _("Modify Printer") : _("Add Printer")); Index: var.c =================================================================== --- var.c (revision 5547) +++ var.c (working copy) @@ -949,7 +949,8 @@ { (void)prompt; - fprintf(stderr, "DEBUG: cgi_passwd(prompt=\"%s\") called!\n", prompt); + fprintf(stderr, "DEBUG: cgi_passwd(prompt=\"%s\") called!\n", + prompt ? prompt : "(null)"); /* * Send a 401 (unauthorized) status to the server, so it can notify