pdfwrite - Guard against trying to output an infinite number
authorKen Sharp <ken.sharp@artifex.com>
Wed, 18 Apr 2018 14:46:32 +0000 (15:46 +0100)
committerKen Sharp <ken.sharp@artifex.com>
Wed, 18 Apr 2018 14:46:32 +0000 (15:46 +0100)
commit39b1e54b2968620723bf32e96764c88797714879
treed179b375918f24483349fce77740081eba421dce
parentfb4c58a0e097e39547dde3d46893ce1b05d19539
pdfwrite - Guard against trying to output an infinite number

Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf"

The file uses an enormous parameter to xyxhow, causing an overflow in
the calculation of text positioning (value > 1e39).

Since this is basically a nonsense value, and PostScript only supports
real values up to 1e38, this patch follows the same approach as for
a degenerate CTM, and treats it as 0.

Adobe Acrobat Distiller throws a limitcheck error, so we could do that
instead if this approach proves to be a problem.
devices/vector/gdevpdts.c