Index: backend/usb-unix.c =================================================================== --- backend/usb-unix.c (revision 9768) +++ backend/usb-unix.c (working copy) @@ -56,7 +56,7 @@ { int use_bc; /* Use backchannel path? */ int device_fd; /* USB device */ - size_t tbytes; /* Total number of bytes written */ + ssize_t tbytes; /* Total number of bytes written */ struct termios opts; /* Parallel port options */ Index: backend/ieee1284.c =================================================================== --- backend/ieee1284.c (revision 9770) +++ backend/ieee1284.c (working copy) @@ -413,10 +413,7 @@ char temp[1024]; /* Temporary make and model */ - if (mfg) - snprintf(temp, sizeof(temp), "%s %s", mfg, mdl); - else - snprintf(temp, sizeof(temp), "%s", mdl); + snprintf(temp, sizeof(temp), "%s %s", mfg, mdl); _ppdNormalizeMakeAndModel(temp, make_model, make_model_size); } Index: backend/parallel.c =================================================================== --- backend/parallel.c (revision 9768) +++ backend/parallel.c (working copy) @@ -85,7 +85,7 @@ device_fd, /* Parallel device */ use_bc; /* Read back-channel data? */ int copies; /* Number of copies to print */ - size_t tbytes; /* Total number of bytes written */ + ssize_t tbytes; /* Total number of bytes written */ struct termios opts; /* Parallel port options */ #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET) struct sigaction action; /* Actions for POSIX signals */ Index: cups/http-addrlist.c =================================================================== --- cups/http-addrlist.c (revision 9768) +++ cups/http-addrlist.c (working copy) @@ -414,7 +414,7 @@ portnum = 80; else if (!strcmp(service, "https")) portnum = 443; - else if (!strcmp(service, "ipp")) + else if (!strcmp(service, "ipp") || !strcmp(service, "ipps")) portnum = 631; else if (!strcmp(service, "lpd")) portnum = 515; @@ -535,14 +535,17 @@ portnum = 80; else if (!strcmp(service, "https")) portnum = 443; - else if (!strcmp(service, "ipp")) + else if (!strcmp(service, "ipp") || !strcmp(service, "ipps")) portnum = 631; else if (!strcmp(service, "lpd")) portnum = 515; else if (!strcmp(service, "socket")) portnum = 9100; else + { + httpAddrFreeList(first); return (NULL); + } if (hostname && !strcasecmp(hostname, "localhost")) { Index: filter/rastertolabel.c =================================================================== --- filter/rastertolabel.c (revision 9768) +++ filter/rastertolabel.c (working copy) @@ -1307,8 +1307,6 @@ _cupsLangPrintFilter(stderr, "INFO", _("Ready to print.")); return (0); } - - return (Page == 0); } Index: filter/bannertops.c =================================================================== --- filter/bannertops.c (revision 9768) +++ filter/bannertops.c (working copy) @@ -992,6 +992,8 @@ if (i == num_pages) cupsImageClose(image); + + free(line); } } Index: filter/image-gif.c =================================================================== --- filter/image-gif.c (revision 9771) +++ filter/image-gif.c (working copy) @@ -462,10 +462,10 @@ pass = 0; code_size = getc(fp); - if (code_size > GIF_MAX_BITS || !pixels) + if (!pixels) return (-1); - if (gif_read_lzw(fp, 1, code_size) < 0) + if (code_size > GIF_MAX_BITS || gif_read_lzw(fp, 1, code_size) < 0) { free(pixels); return (-1); Index: scheduler/conf.c =================================================================== --- scheduler/conf.c (revision 9770) +++ scheduler/conf.c (working copy) @@ -3948,14 +3948,9 @@ } else if (!parse_aaa(op, line, value, linenum)) { - if (op) - cupsdLogMessage(CUPSD_LOG_ERROR, - "Unknown Policy Limit directive %s on line %d.", - line, linenum); - else - cupsdLogMessage(CUPSD_LOG_ERROR, - "Unknown Policy directive %s on line %d.", - line, linenum); + cupsdLogMessage(CUPSD_LOG_ERROR, + "Unknown Policy Limit directive %s on line %d.", + line, linenum); if (FatalErrors & CUPSD_FATAL_CONFIG) return (0); Index: scheduler/ipp.c =================================================================== --- scheduler/ipp.c (revision 9770) +++ scheduler/ipp.c (working copy) @@ -5689,11 +5689,9 @@ snprintf(buffer, sizeof(buffer), "%s/daemon/cups-driverd", ServerBin); snprintf(tempfile, sizeof(tempfile), "%s/%d.ppd", TempDir, con->http.fd); tempfd = open(tempfile, O_WRONLY | O_CREAT | O_TRUNC, 0600); - if (tempfd < 0) + if (tempfd < 0 || cupsdOpenPipe(temppipe)) return (-1); - cupsdOpenPipe(temppipe); - cupsdLogMessage(CUPSD_LOG_DEBUG, "copy_model: Running \"cups-driverd cat %s\"...", from); @@ -10812,7 +10810,9 @@ cupsdLogMessage(status == HTTP_FORBIDDEN ? CUPSD_LOG_ERROR : CUPSD_LOG_DEBUG, "Returning HTTP %s for %s (%s) from %s", httpStatus(status), - ippOpString(con->request->request.op.operation_id), + con->request ? + ippOpString(con->request->request.op.operation_id) : + "no operation-id", uri ? uri->values[0].string.text : "no URI", con->http.hostname); Index: scheduler/client.c =================================================================== --- scheduler/client.c (revision 9768) +++ scheduler/client.c (working copy) @@ -2815,7 +2815,12 @@ if (!strncasecmp(con->header, "Location:", 9)) { - cupsdSendHeader(con, HTTP_SEE_OTHER, NULL, CUPSD_AUTH_NONE); + if (!cupsdSendHeader(con, HTTP_SEE_OTHER, NULL, CUPSD_AUTH_NONE)) + { + cupsdCloseClient(con); + return; + } + con->sent_header = 2; if (httpPrintf(HTTP(con), "Content-Length: 0\r\n") < 0) @@ -2829,7 +2834,12 @@ } else { - cupsdSendHeader(con, HTTP_OK, NULL, CUPSD_AUTH_NONE); + if (!cupsdSendHeader(con, HTTP_OK, NULL, CUPSD_AUTH_NONE)) + { + cupsdCloseClient(con); + return; + } + con->sent_header = 1; if (con->http.version == HTTP_1_1) @@ -3952,8 +3962,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "is_cgi(con=%p(%d), filename=\"%s\", filestats=%p, " "type=%s/%s) = 1", con, con->http.fd, filename, filestats, - type ? type->super : "unknown", - type ? type->type : "unknown"); + type->super, type->type); return (1); } #ifdef HAVE_JAVA @@ -3973,8 +3982,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "is_cgi(con=%p(%d), filename=\"%s\", filestats=%p, " "type=%s/%s) = 1", con, con->http.fd, filename, filestats, - type ? type->super : "unknown", - type ? type->type : "unknown"); + type->super, type->type); return (1); } #endif /* HAVE_JAVA */ @@ -3995,8 +4003,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "is_cgi(con=%p(%d), filename=\"%s\", filestats=%p, " "type=%s/%s) = 1", con, con->http.fd, filename, filestats, - type ? type->super : "unknown", - type ? type->type : "unknown"); + type->super, type->type); return (1); } #endif /* HAVE_PERL */ @@ -4017,8 +4024,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "is_cgi(con=%p(%d), filename=\"%s\", filestats=%p, " "type=%s/%s) = 1", con, con->http.fd, filename, filestats, - type ? type->super : "unknown", - type ? type->type : "unknown"); + type->super, type->type); return (1); } #endif /* HAVE_PHP */ @@ -4039,8 +4045,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "is_cgi(con=%p(%d), filename=\"%s\", filestats=%p, " "type=%s/%s) = 1", con, con->http.fd, filename, filestats, - type ? type->super : "unknown", - type ? type->type : "unknown"); + type->super, type->type); return (1); } #endif /* HAVE_PYTHON */ @@ -4048,8 +4053,7 @@ cupsdLogMessage(CUPSD_LOG_DEBUG2, "is_cgi(con=%p(%d), filename=\"%s\", filestats=%p, " "type=%s/%s) = 0", con, con->http.fd, filename, filestats, - type ? type->super : "unknown", - type ? type->type : "unknown"); + type->super, type->type); return (0); }