segfault printing in slackware64-current
A segfault may occur while printing with CUPS if foomatic-rip is in your filter chain. the version of foomatic-rip in cups-filters-1.21.0 has a heap management error in options processing, and the resulting corruption may corrupt variables or crash the foomatic-rip filter ("filter failed" error). Upstream (immediately) fixed the error in version 1.21.1, but Slackware has not updated the package yet. Here is a patch to 1.12.0 until then:
--- /tmp/cups-filters-1.21.0/filter/foomatic-rip/options.c 2018-08-24 16:06:43.794415076 -0700
+++ /usr/local/slackbuilds/cups-filters-1.21.0/filter/foomatic-rip/options.c 2018-08-25 14:23:36.781505644 -0700
@@ -1031,12 +1031,10 @@
/* TODO only set the changed option, not all of them */
choice = option_find_choice(fromopt,
option_get_value(fromopt, optionset));
-
composite_set_values(fromopt, optionset, choice->command);
- }
- else {
+ free(newvalue);
+ } else
val->value = newvalue;
- }
if (option_is_composite(opt)) {
/* set dependent values */
@@ -1044,7 +1042,6 @@
if (choice && !isempty(choice->command))
composite_set_values(opt, optionset, choice->command);
}
- free(newvalue);
return 1;
}
|