From 8ae0b22c8e441f53efda889c930d1ebde2fde61a Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 19 Mar 2011 21:52:37 +0000 Subject: Add comment git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1435 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/picttoppm.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'converter/ppm') diff --git a/converter/ppm/picttoppm.c b/converter/ppm/picttoppm.c index 4f1eb893..b1717bee 100644 --- a/converter/ppm/picttoppm.c +++ b/converter/ppm/picttoppm.c @@ -1942,6 +1942,15 @@ ClipRgn(struct canvas * const canvasP, if (len == 10) { /* null rgn */ /* Parameter is 2 bytes of length, 8 bytes of rectangle corners */ + + /* In March 2011, I saw a supposed PICT file (reported to work with + Apple pictureViewer) with what looked like signed numbers for the + rectangle: (-32767,-32767), (32767, 32767). This code has always + assumed all words in a PICT are unsigned. But even when I changed + it to accept this clip rectangle, this program found the image to + have an invalid raster. + */ + readRect(&clip_rect); /* XXX should clip this by picFrame */ if (verbose) -- cgit 1.4.1