bug-ghostscript
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Blank "%%+" lines in DSCs causes segfaulting


From: Sean M. Burke
Subject: Blank "%%+" lines in DSCs causes segfaulting
Date: Sat, 03 Dec 2005 14:52:10 -0900
User-agent: Mozilla Thunderbird 1.0.7-1.1.fc3 (X11/20050929)

I've found a bug apparently in some part of GhostView involving the parsing of DSC. The bug appears where there's a DSC 'continuation line' consisting just of "%%+", as apposed to "%%+ foo" or the like.

This pair of Hello World documents illustrates:

http://interglacial.com/~sburke/pub/PostScript/dsc_plusline_000.ps
http://interglacial.com/~sburke/pub/PostScript/dsc_plusline_001.ps

The 000 causes no problems. But 001 invariably causes segfaults (!) in kghostview under Linux and in gs under MacOSX. The only difference is that 001 has a blank "%%+" continuation line.

They're short, so I'll also just include them here.
Here's dsc_plusline_000.ps:

-----snip
%!PS-Adobe-2.0
%%Title: That thing
%%+I sencha
%%Creator: Peter Potamus

%%Page: 1 1
/pgsave save def
/Times-Roman findfont 30 scalefont setfont
108 504 moveto (Hello, World!) show
showpage pgsave restore

%%EOF
-----snip

And here's dsc_plusline_001.ps that causes the trouble:

-----snip
%!PS-Adobe-2.0
%%Title: That thing
%%+
%%+I sencha
%%Creator: Peter Potamus

%%Page: 1 1
/pgsave save def
/Times-Roman findfont 30 scalefont setfont
108 504 moveto (Hello, World!) show
showpage pgsave restore

%%EOF
-----snip


Here's what the relevent "gs -v" (from Fink) says:
AFPL Ghostscript 8.51 (2005-04-18)
Copyright (C) 2005 artofcode LLC, Benicia, CA.  All rights reserved.


And here's what the "kghostview -v" says:
Qt: 3.3.4
KDE: 3.4.2-0.fc3.2 Red Hat
KGhostView: 0.20

This is the output from the KDE crash handler's backtracer:

Using host libthread_db library "/lib/tls/i686/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1208137024 (LWP 14095)]
[KCrash handler]
#3  0x005d018c in memcpy () from /lib/tls/i686/libc.so.6
#4  0x00a1d982 in dsc_set_page_bbox () from /usr/lib/libkghostviewlib.so.0
#5  0x0820f68c in ?? ()
#6  0xfffffffb in ?? ()
#7  0x0098b54c in ?? () from /usr/lib/libstdc++.so.6
#8  0xbfffd7c0 in ?? ()
#9  0xfffffffb in ?? ()
#10 0x0820f68c in ?? ()
#11 0x00a2c7d4 in ?? () from /usr/lib/libkghostviewlib.so.0
#12 0xfffffffb in ?? ()
#13 0x0820f68c in ?? ()
#14 0xbfffd788 in ?? ()
#15 0x00a1e812 in dsc_init () from /usr/lib/libkghostviewlib.so.0
On that machine, "gs -v" says
GNU Ghostscript 7.07 (2003-05-17)

Clearly the workaround is to just not have blank "%%+" lines. But a proper bugfix would be nice.

--
Sean M. Burke   http://search.cpan.org/~sburke/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]