First, this is definitely a CUPS upstream bug, so please report it on the CUPS GitHub, also supplying all the information which you have gathered and attaching the files which I had asked for.

https://github.com/apple/cups/issues/

Probably it can be solved by adding a simple NULL check.

At line 273 of rastertopwg.c replace

      if (pwg_media)
        strlcpy(outheader.cupsPageSizeName, pwg_media->pwg,
                sizeof(outheader.cupsPageSizeName));

by

      if (pwg_media && pwg_media->pwg)
        strlcpy(outheader.cupsPageSizeName, pwg_media->pwg,
                sizeof(outheader.cupsPageSizeName));

Please try it if you are familiar with source code and compiling. Tell your result here and also in the upstream bug you are reporting.

   Till

Reply via email to