Menu

#607 Slow to convert HP PCL printer data

v1.0_(example)
closed-fixed
None
5
2020-12-06
2019-04-14
Hongxu Chen
No

As of changeset 15965:09a101f0a1a3, gm convert is extremely to process HPGL files. On my machine, it took 282s and 21s to run against the attached files with gm convert $FILE /dev/null respectively.
It may be necessary to apply some more checks before delegating to hp2xx (ImageMagick exits immediately).

2 Attachments

Discussion

  • Hongxu Chen

    Hongxu Chen - 2019-04-15

    BTW, since we basically apply fuzzing, we notice that hp2xx may sometimes have difficulty in exiting.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2019-04-15

    I am not sure what additional "checks" could be reasonably added to "validate" HPGL input files prior to handing responsiblity for software which does have intimate knowledge of HPGL parsing. The actual problem here appears to be with hp2xx.

    Unfortunately, hp2xx is unmaintained since 2003 and so it is unlikely to fare well in today's world of software fuzzing. Are there any fuzzing efforts for hp2xx and a set of effective patches for the problems found?

    We currently request EPS output from hp2xx. EPS requires use of Ghostscript which has in recent years been noted to have serious security issues (e.g. execution of arbitrary shell commands and reading/writing arbitrary files) of a type which may or may not be fully addressed in the latest releases.

    In some cases hp2xx supports SVG output. Unfortunately a quick test shows that the SVG output is somewhat defective and so it can't reasonably be used as a replacement for EPS.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2020-12-06

    I am testing under Ubuntu 18 and when using ImageMagick 6.9.7-4 I see that it tries to use a 'pcl6' external program, which I don't have, and don't know how to install. If it is doing something similar in your environment (and there is no 'pcl6' external program) then that would explain why ImageMagick quits immediately.

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2020-12-06
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2020-12-06

    This issue is fixed by Mercurial changeset 16395:4fc18176a211. PCL files are no longer sent to the HPGL delegate.

     

Log in to post a comment.

MongoDB Logo MongoDB