Prev · NextSTR #4270: long mime types not handled properly

Status:5 - New
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Scheduler
Summary:long mime types not handled properly
Version:1.6-current
Created By:patwood
Assigned To:mike
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails


Trouble Report Files:

No files


Trouble Report Dialog:

Name/Time/Date/Text
patwood: 21:46 Feb 05, 2013
 
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[^;]".

 
mike: 05:01 Feb 12, 2013
 
Changing to a P2 bug report.