apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.93k stars 464 forks source link

Crash on startup with mime rule expressions in paranthesis using logical AND #3159

Closed michaelrsweet closed 15 years ago

michaelrsweet commented 15 years ago

Version: 1.3.8 CUPS.org User: Nsvoboda

Many mime rules that:

begin with an expression in parenthesis, have the first expression followed by an AND operator

will cause a crash in cupsd on startup. The error is "cupsd: Child exited on signal 11!" I have not been able to determine the exact syntax that trips this error. In some cases, meeting the above conditions for a crash will not cause a crash.

The following will crash when starting cupsd:


application/vnd.hp-HPGL (hpgl) + string(0,<1B>E<1B>%0B)


application/vnd.hp-HPGL (hpgl) + \ string(0,<1B>E<1B>%0B)


However, these will not crash

application/vnd.hp-HPGL string(0,<1B>E<1B>%0B) + (hpgl)

application/vnd.hp-HPGL (hpgl) , string(0,<1B>E<1B>%0B)

application/vnd.hp-HPGL hpgl + string(0,<1B>E<1B>%0B)

michaelrsweet commented 15 years ago

CUPS.org User: mike

Fixed in Subversion repository.

michaelrsweet commented 15 years ago

"str3159.patch":

Index: scheduler/type.c

--- scheduler/type.c (revision 8575) +++ scheduler/type.c (working copy) @@ -209,7 +209,7 @@

     DEBUG_printf(("mimeAddTypeRule: Creating new AND group %p...\n", temp));
   }