"print-quality" (Issue #734)
- Updated `cups_enum_dests()` timeout for listing available IPP printers
(Issue #751)
+- Updated the `ippeveprinter` program to support the `-f` option with `-a`
+ (Issue #759)
- Updated default destination documentation (Issue #819)
- Updated `httpAddrConnect2()` to handle `POLLHUP` together with `POLLIN` or
`POLLOUT` (Issue #839)
- Updated the "get-printer-attributes-suite.test" test file (Issue #909)
- Updated `cupsRasterReadPixels` and `cupsRasterWritePixels` to not try reading
or writing if the number of bytes passed is 0 (Issue #914)
-- The `ippeveprinter` program now supports the `-f` option with `-a`
- (Issue #759)
+- Updated and documented the MIME typing buffering limit (Issue #925)
- Fixed use-after-free in `cupsdAcceptClient()` when we log warning during error
handling (fixes CVE-2023-34241)
- Fixed hanging of `lpstat` on Solaris (Issue #156)
application/pdf pdf regex(0,^[\n\r]*%PDF)
application/postscript ai eps ps string(0,%!) string(0,<04>%!) \
contains(0,128,<1B>%-12345X) + \
- (contains(0,4096,"LANGUAGE=POSTSCRIPT") \
- contains(0,4096,"LANGUAGE = Postscript") \
- contains(0,4096,"LANGUAGE = PostScript") \
- contains(0,4096,"LANGUAGE = POSTSCRIPT") \
- (contains(0,4096,<0a>%!) + \
- !contains(0,4096,"ENTER LANGUAGE")))
+ (contains(0,8192,"LANGUAGE=POSTSCRIPT") \
+ contains(0,8192,"LANGUAGE = Postscript") \
+ contains(0,8192,"LANGUAGE = PostScript") \
+ contains(0,8192,"LANGUAGE = POSTSCRIPT") \
+ (contains(0,8192,<0a>%!) + \
+ !contains(0,8192,"ENTER LANGUAGE")))
########################################################################
application/vnd.cups-raw (string(0,<1B>E) + !string(2,<1B>%0B)) \
string(0,<1B>@) \
(contains(0,128,<1B>%-12345X) + \
- (contains(0,4096,"LANGUAGE=PCL") \
- contains(0,4096,"LANGUAGE = PCL")))
+ (contains(0,8192,"LANGUAGE=PCL") \
+ contains(0,8192,"LANGUAGE = PCL")))
########################################################################
#
values inside parenthesis.
The following functions are available:
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>match("</strong><em>pattern</em><strong>")</strong><br>
-True if the filename matches the given shell wildcard <em>pattern</em>.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>match("</strong><em>PATTERN</em><strong>")</strong><br>
+True if the filename matches the given shell wildcard <em>PATTERN</em>.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ascii(</strong><em>offset</em><strong>,</strong><em>length</em><strong>)</strong><br>
-True if the <em>length</em> bytes starting at <em>offset</em> are valid printable ASCII (CR, NL, TAB, BS, 32-126).
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>ascii(</strong><em>OFFSET</em><strong>,</strong><em>LENGTH</em><strong>)</strong><br>
+True if the <em>LENGTH</em> bytes starting at <em>OFFSET</em> are valid printable ASCII (CR, NL, TAB, BS, 32-126).
+<em>LENGTH</em> cannot exceed 8192 bytes.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>printable(</strong><em>offset</em><strong>,</strong><em>length</em><strong>)</strong><br>
-True if the <em>length</em> bytes starting at <em>offset</em> are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254).
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>printable(</strong><em>OFFSET</em><strong>,</strong><em>LENGTH</em><strong>)</strong><br>
+True if the <em>LENGTH</em> bytes starting at <em>OFFSET</em> are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254).
+<em>LENGTH</em> cannot exceed 8192 bytes.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>priority(</strong><em>number</em><strong>)</strong><br>
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>priority(</strong><em>NUMBER</em><strong>)</strong><br>
Specifies the relative priority of this MIME media type.
The default priority is 100.
Larger values have higher priority while smaller values have lower priority.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>string(</strong><em>offset</em><strong>,"</strong><em>string</em><strong>")</strong><br>
-True if the bytes starting at <em>offset</em> are identical to <em>string</em>.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>string(</strong><em>OFFSET</em><strong>,"</strong><em>STRING</em><strong>")</strong><br>
+True if the bytes starting at <em>OFFSET</em> are identical to <em>STRING</em>.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>istring(</strong><em>offset</em><strong>,"</strong><em>string</em><strong>")</strong><br>
-True if the bytes starting at <em>offset</em> match <em>string</em> without respect to case.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>istring(</strong><em>OFFSET</em><strong>,"</strong><em>STRING</em><strong>")</strong><br>
+True if the bytes starting at <em>OFFSET</em> match <em>STRING</em> without respect to case.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>char(</strong><em>offset</em><strong>,</strong><em>value</em><strong>)</strong><br>
-True if the byte at <em>offset</em> is identical to <em>value</em>.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>char(</strong><em>OFFSET</em><strong>,</strong><em>VALUE</em><strong>)</strong><br>
+True if the byte at <em>OFFSET</em> is identical to <em>VALUE</em>.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>short(</strong><em>offset</em><strong>,</strong><em>value</em><strong>)</strong><br>
-True if the 16-bit big-endian integer at <em>offset</em> is identical to <em>value</em>.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>short(</strong><em>OFFSET</em><strong>,</strong><em>VALUE</em><strong>)</strong><br>
+True if the 16-bit big-endian integer at <em>OFFSET</em> is identical to <em>VALUE</em>.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>int(</strong><em>offset</em><strong>,</strong><em>value</em><strong>)</strong><br>
-True if the 32-bit big-endian integer at <em>offset</em> is identical to <em>value</em>.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>int(</strong><em>OFFSET</em><strong>,</strong><em>VALUE</em><strong>)</strong><br>
+True if the 32-bit big-endian integer at <em>OFFSET</em> is identical to <em>VALUE</em>.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>locale("</strong><em>string</em><strong>")</strong><br>
-True if current locale matches <em>string</em>.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>locale("</strong><em>STRING</em><strong>")</strong><br>
+True if current locale matches <em>STRING</em>.
</p>
- <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>contains(</strong><em>offset</em><strong>,</strong><em>range</em><strong>,"</strong><em>string</em><strong>")</strong><br>
-True if the bytes starting at <em>offset</em> for <em>range</em> bytes contains <em>string</em>.
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>contains(</strong><em>OFFSET</em><strong>,</strong><em>LENGTH</em><strong>,"</strong><em>STRING</em><strong>")</strong><br>
+True if the bytes starting at <em>OFFSET</em> for <em>LENGTH</em> bytes contains <em>STRING</em>.
+<em>LENGTH</em> cannot exceed 8192 bytes.
</p>
<h3 id="mime.types-5.description.string-constants">String Constants</h3>
<p>String constants can be specified inside quotes ("") for strings containing whitespace and angle brackets (<>) for hexadecimal strings.
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH mime.types 5 "CUPS" "2021-02-28" "OpenPrinting"
+.TH mime.types 5 "CUPS" "2024-04-18" "OpenPrinting"
.SH NAME
mime.types \- mime type description file for cups
.SH DESCRIPTION
values inside parenthesis.
The following functions are available:
.TP 5
-\fBmatch("\fIpattern\fB")\fR
-True if the filename matches the given shell wildcard \fIpattern\fR.
+\fBmatch("\fIPATTERN\fB")\fR
+True if the filename matches the given shell wildcard \fIPATTERN\fR.
.TP 5
-\fBascii(\fIoffset\fB,\fIlength\fB)\fR
-True if the \fIlength\fR bytes starting at \fIoffset\fR are valid printable ASCII (CR, NL, TAB, BS, 32-126).
+\fBascii(\fIOFFSET\fB,\fILENGTH\fB)\fR
+True if the \fILENGTH\fR bytes starting at \fIOFFSET\fR are valid printable ASCII (CR, NL, TAB, BS, 32-126).
+\fILENGTH\fR cannot exceed 8192 bytes.
.TP 5
-\fBprintable(\fIoffset\fB,\fIlength\fB)\fR
-True if the \fIlength\fR bytes starting at \fIoffset\fR are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254).
+\fBprintable(\fIOFFSET\fB,\fILENGTH\fB)\fR
+True if the \fILENGTH\fR bytes starting at \fIOFFSET\fR are printable 8-bit chars (CR, NL, TAB, BS, 32-126, 128-254).
+\fILENGTH\fR cannot exceed 8192 bytes.
.TP 5
-\fBpriority(\fInumber\fB)\fR
+\fBpriority(\fINUMBER\fB)\fR
Specifies the relative priority of this MIME media type.
The default priority is 100.
Larger values have higher priority while smaller values have lower priority.
.TP 5
-\fBstring(\fIoffset\fB,"\fIstring\fB")\fR
-True if the bytes starting at \fIoffset\fR are identical to \fIstring\fR.
+\fBstring(\fIOFFSET\fB,"\fISTRING\fB")\fR
+True if the bytes starting at \fIOFFSET\fR are identical to \fISTRING\fR.
.TP 5
-\fBistring(\fIoffset\fB,"\fIstring\fB")\fR
-True if the bytes starting at \fIoffset\fR match \fIstring\fR without respect to case.
+\fBistring(\fIOFFSET\fB,"\fISTRING\fB")\fR
+True if the bytes starting at \fIOFFSET\fR match \fISTRING\fR without respect to case.
.TP 5
-\fBchar(\fIoffset\fB,\fIvalue\fB)\fR
-True if the byte at \fIoffset\fR is identical to \fIvalue\fR.
+\fBchar(\fIOFFSET\fB,\fIVALUE\fB)\fR
+True if the byte at \fIOFFSET\fR is identical to \fIVALUE\fR.
.TP 5
-\fBshort(\fIoffset\fB,\fIvalue\fB)\fR
-True if the 16-bit big-endian integer at \fIoffset\fR is identical to \fIvalue\fR.
+\fBshort(\fIOFFSET\fB,\fIVALUE\fB)\fR
+True if the 16-bit big-endian integer at \fIOFFSET\fR is identical to \fIVALUE\fR.
.TP 5
-\fBint(\fIoffset\fB,\fIvalue\fB)\fR
-True if the 32-bit big-endian integer at \fIoffset\fR is identical to \fIvalue\fR.
+\fBint(\fIOFFSET\fB,\fIVALUE\fB)\fR
+True if the 32-bit big-endian integer at \fIOFFSET\fR is identical to \fIVALUE\fR.
.TP 5
-\fBlocale("\fIstring\fB")\fR
-True if current locale matches \fIstring\fR.
+\fBlocale("\fISTRING\fB")\fR
+True if current locale matches \fISTRING\fR.
.TP 5
-\fBcontains(\fIoffset\fB,\fIrange\fB,"\fIstring\fB")\fR
-True if the bytes starting at \fIoffset\fR for \fIrange\fR bytes contains \fIstring\fR.
+\fBcontains(\fIOFFSET\fB,\fILENGTH\fB,"\fISTRING\fB")\fR
+True if the bytes starting at \fIOFFSET\fR for \fILENGTH\fR bytes contains \fISTRING\fR.
+\fILENGTH\fR cannot exceed 8192 bytes.
.SS STRING CONSTANTS
String constants can be specified inside quotes ("") for strings containing whitespace and angle brackets (<>) for hexadecimal strings.
.SS TYPE MATCHING AND PRIORITY
# define MIME_MAX_TYPE IPP_MAX_NAME
// Maximum size of type name
# define MIME_MAX_FILTER 256 // Maximum size of filter pathname
-# define MIME_MAX_BUFFER 4096 // Maximum size of file buffer
+# define MIME_MAX_BUFFER 8192 // Maximum size of file buffer
//