Contents of /trunk/cups/patches/cups-2.2.8-5325.patch
Parent Directory | Revision Log
Revision 3125 -
(show annotations)
(download)
Tue Jun 12 11:56:57 2018 UTC (6 years, 3 months ago) by niro
File size: 1867 byte(s)
Tue Jun 12 11:56:57 2018 UTC (6 years, 3 months ago) by niro
File size: 1867 byte(s)
-upstream patch, prevent gsd-print-notifications causing a polling storm
1 | diff -u -r cups-2.2.8/cups/ipp.c cups-2.2.8-fix/cups/ipp.c |
2 | --- cups-2.2.8/cups/ipp.c 2018-06-05 18:06:54.000000000 +0200 |
3 | +++ cups-2.2.8-fix/cups/ipp.c 2018-06-08 22:06:24.850309110 +0200 |
4 | @@ -5094,15 +5094,13 @@ |
5 | else if (*ptr & 0x80) |
6 | break; |
7 | else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f) |
8 | - break; |
9 | + { |
10 | + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text); |
11 | + return (0); |
12 | + } |
13 | } |
14 | |
15 | - if (*ptr < ' ' || *ptr == 0x7f) |
16 | - { |
17 | - ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text); |
18 | - return (0); |
19 | - } |
20 | - else if (*ptr) |
21 | + if (*ptr) |
22 | { |
23 | ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text); |
24 | return (0); |
25 | @@ -5156,15 +5154,13 @@ |
26 | else if (*ptr & 0x80) |
27 | break; |
28 | else if (*ptr < ' ' || *ptr == 0x7f) |
29 | - break; |
30 | + { |
31 | + ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text); |
32 | + return (0); |
33 | + } |
34 | } |
35 | |
36 | - if (*ptr < ' ' || *ptr == 0x7f) |
37 | - { |
38 | - ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text); |
39 | - return (0); |
40 | - } |
41 | - else if (*ptr) |
42 | + if (*ptr) |
43 | { |
44 | ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text); |
45 | return (0); |