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
Both result in the scheduler auto-typing as text/plain.
This happens because of a wrong if' at line 189. At the point when we reach the (first)+' in:
application/x-shell sh printable(0,1024) + string(0,#!)
We have:
logic == MIME_MAGIC_OR
current != NULL
current->prev != NULL
current->prev->prev == NULL
and so the `if' expression evaluates to FALSE and we end up executing this block (line 215):
current->parent->op = MIME_MAGIC_AND;
which ends up evaluating the rule as: sh + printable(0,1024) + ...
The fix is to drop the current->prev->prev != NULL' evaluation from theif'. Please also note that in the "truth" block current->prev->prev is never referenced.
Patch attached.
The text was updated successfully, but these errors were encountered:
Version: 1.3-current
CUPS.org User: opher
The function mimeAddTypeRule() in scheduler/type.c parses some rules wrong. This happens for example to:
application/x-shell
Try this:
----------- foo.sh start --------------
echo "Hello, World!"
----------- foo.bash start ------------
!/bin/bash
echo "Hello, World!"
(1) lp -d printer foo.sh
(2) lp -d printer foo.bash
Both result in the scheduler auto-typing as text/plain.
This happens because of a wrong
if' at line 189. At the point when we reach the (first)
+' in:application/x-shell sh printable(0,1024) + string(0,#!)
We have:
logic == MIME_MAGIC_OR
current != NULL
current->prev != NULL
current->prev->prev == NULL
and so the `if' expression evaluates to FALSE and we end up executing this block (line 215):
current->parent->op = MIME_MAGIC_AND;
which ends up evaluating the rule as: sh + printable(0,1024) + ...
The fix is to drop the
current->prev->prev != NULL' evaluation from the
if'. Please also note that in the "truth" block current->prev->prev is never referenced.Patch attached.
The text was updated successfully, but these errors were encountered: