You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The manpage mime.types.5 does not mention the limitation of the matching buffer, e.g. for the contains operation. Matching is currently limited to 4096.
If higher lengths are used, matching seems to be silently limited to the first 4096 characters following the offset.
To Reproduce
Steps to reproduce the behavior:
Add a mime.types dropin using contains(0,8000,"LANGUAGE=PCL").
# defineMIME_MAX_BUFFER 4096 // Maximum size of file buffer
Of course a limit is very reasonable (#924 shows that is may be too small for nowadays print jobs in some cases to cover everything in a single match, though). It would be nice if this limit was documented or exceeding it would produce a warning (or both).
Describe the bug
The manpage
mime.types.5does not mention the limitation of the matching buffer, e.g. for thecontainsoperation. Matching is currently limited to 4096.If higher lengths are used, matching seems to be silently limited to the first 4096 characters following the offset.
To Reproduce
Steps to reproduce the behavior:
mime.typesdropin usingcontains(0,8000,"LANGUAGE=PCL").application/vnd.cups-rawif header is too long #924 , withcupsfilter.Expected behavior
An error should be shown, or the limitation should be documented (or both).
Additional context
Limitation is hardcoded in the code here:
cups/scheduler/mime.h
Line 32 in 9383b37
Of course a limit is very reasonable (#924 shows that is may be too small for nowadays print jobs in some cases to cover everything in a single match, though). It would be nice if this limit was documented or exceeding it would produce a warning (or both).