Package: gv
Version: 1:3.7.4-1
Severity: normal
File: /usr/bin/gv

With the foo.ps below running

    gv foo.ps

gets a segfault.  The blank line in foo.ps seems to matter.  If you take
it away then gv doesn't segv.

I struck this in some output from an "lsys" program.  This foo.ps is an
extremely cut down version of its output.  I have no idea if this or the
original are correct postscript.  Perhaps not.  I hoped that if not then
it would provoke an error message of some sort rather than a segv.

Building with noopt and under gdb suggests the offending part may be

__strlen_ia32 () at ../sysdeps/i386/i686/multiarch/../../i586/strlen.S:98
98      ../sysdeps/i386/i686/multiarch/../../i586/strlen.S: No such file or 
directory.
(gdb) where
#0  __strlen_ia32 () at ../sysdeps/i386/i686/multiarch/../../i586/strlen.S:98
#1  0x0806ba3f in setup_ghostview () at misc.c:999
#2  0x080686c9 in main (argc=2, argv=0xbffff914) at main.c:1238

with misc.c:999

    maxlen = max(maxlen, (int)strlen(doc->pages[i].label));

i==0 and doc->pages[i].label == NULL, so strlen(NULL) faulting.  Should
it watch out for structured but dodgy documents leaving label=NULL?


Attachment: foo.ps
Description: PostScript document


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gv depends on:
ii  ghostscript-x  9.05~dfsg-8
ii  libc6          2.17-93
ii  libx11-6       2:1.6.2-1
ii  libxinerama1   2:1.1.3-1
ii  libxmu6        2:1.1.1-1
ii  libxt6         1:1.1.4-1
ii  xaw3dg         1.5+E-18.2

Versions of packages gv recommends:
ii  xaw3dg  1.5+E-18.2

gv suggests no packages.

-- no debconf information

Reply via email to