summaryrefslogtreecommitdiff
path: root/backend/ipp.c
diff options
context:
space:
mode:
authorMichael R Sweet <michaelrsweet@gmail.com>2017-01-26 16:27:05 -0500
committerMichael R Sweet <michaelrsweet@gmail.com>2017-01-26 16:27:05 -0500
commit887fbb5445d5da96d79c3fb735295eda715729c0 (patch)
tree98a20f08d80bafa1560b124d9035f20783661370 /backend/ipp.c
parentc245abfeb8f9bd45e8beb46c6f4694586f9f1c84 (diff)
downloadcups-887fbb5445d5da96d79c3fb735295eda715729c0.tar.gz
The IPP backend could get into an infinite loop for certain errors, causing a
hung queue (<rdar://problem/28008717>)
Diffstat (limited to 'backend/ipp.c')
-rw-r--r--backend/ipp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/backend/ipp.c b/backend/ipp.c
index 6eefd144e..685d4d9df 100644
--- a/backend/ipp.c
+++ b/backend/ipp.c
@@ -1,7 +1,7 @@
/*
* IPP backend for CUPS.
*
- * Copyright 2007-2016 by Apple Inc.
+ * Copyright 2007-2017 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -1469,7 +1469,7 @@ main(int argc, /* I - Number of command-line args */
while (!job_canceled && validate_job)
{
- request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2],
+ request = new_request(IPP_OP_VALIDATE_JOB, version, uri, argv[2],
monitor.job_name, num_options, options, compression,
copies_sup ? copies : 1, document_format, pc, ppd,
media_col_sup, doc_handling_sup, print_color_mode_sup);
@@ -1533,6 +1533,8 @@ main(int argc, /* I - Number of command-line args */
else if (ipp_status < IPP_REDIRECTION_OTHER_SITE ||
ipp_status == IPP_BAD_REQUEST)
break;
+ else if (job_auth == NULL && ipp_status > IPP_BAD_REQUEST)
+ goto cleanup;
}
/*
@@ -2216,7 +2218,7 @@ main(int argc, /* I - Number of command-line args */
return (CUPS_BACKEND_HOLD);
else if (ipp_status == IPP_INTERNAL_ERROR)
return (CUPS_BACKEND_STOP);
- else if (ipp_status == IPP_CONFLICT)
+ else if (ipp_status == IPP_CONFLICT || ipp_status == IPP_STATUS_ERROR_REQUEST_ENTITY || ipp_status == IPP_STATUS_ERROR_REQUEST_VALUE)
return (CUPS_BACKEND_FAILED);
else if (ipp_status == IPP_REQUEST_VALUE ||
ipp_status == IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES ||