[cups.development] [RFE] STR #4270: long mime types not handled properly
Patrick Wood
patrickhwood at gmail.com
Wed Feb 6 08:34:00 PST 2013
DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New]
Throughout scheduler/ipp.c, the mime subtypes are parsed with
"sscanf(...text, "%15[^/]/%31[^;]", super, type), but type is declared to
be a char array of MIME_MAX_SIZE (256 bytes). Mime subtypes longer than
31 bytes are truncated, and subsequently the mimeType() call into the
database fails. There is no reason to limit the sscanf parsing of type to
31 bytes.
An example is a printer that handles MS Office document types. Open XML
mime type names are very long, e.g.,
application/vnd.openxmlformats-officedocument.spreadsheetml.template
and fail to print w/o changing these sscanf calls to use
"%15[^/]/%255[^;]".
Link: https://www.cups.org/str.php?L4270
Version: -feature
More information about the cups-devel
mailing list