Closed emilio closed 1 year ago
https://github.com/OpenPrinting/cups/commit/070c57da3951c7c5f05b49474ceaf8026dc43bb9 (from #455) looks trivially wrong if the passed name is null, it calls cups_name_cb
with a null data->name
, which crashes on the strcasecmp
call. Before there was an if (name)
null-check that prevented it.
cc @zdohnal @tillkamppeter
Hi Emilio,
thank you for the patch and I'm sorry for inconvenience! I'll release a new version with this issue fixed today, because it breaks a common use case.
Describe the bug
Libcups crashes when passing nullptr to cupsGetNamedDest:
To Reproduce Steps to reproduce the behavior:
Expected behavior Doesn't crash, default dest is returned.
System Information:
Additional context
See https://bugzilla.mozilla.org/show_bug.cgi?id=1836764 for crash stacks and the relevant firefox code which is just calling
cupsGetNamedDest
as described.https://github.com/OpenPrinting/cups/commit/070c57da3951c7c5f05b49474ceaf8026dc43bb9 looks like a relevant regressing commit.