Bug#452789: xxd segfaults with large values for -c

James Vega jamessan at jamessan.com
Thu Nov 29 18:48:17 UTC 2007


On Wed, Nov 28, 2007 at 09:19:46AM -0500, James Vega wrote:
> On Tue, Nov 27, 2007 at 10:26:31PM +0100, Bram Moolenaar wrote:
> > I'm not the maintainer of xxd, but since it's included with Vim I tried
> > fixing it anyway.  Please try the patch below and check that it fixes
> > the problem for you.
> 
> That does work. Thanks.

Actually, I was incorrect.  I still see crashes when using values larger
than 140 for -c.  The following was from running
"xxd -b -c 145 /usr/bin/xxd".

Program received signal SIGSEGV, Segmentation fault.
0xb7e4fdfd in getc () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0  0xb7e4fdfd in getc () from /lib/i686/cmov/libc.so.6
#1  0x0804a0a8 in main (argc=2, argv=0xbff033d0) at xxd.c:732
#2  0xb7e04450 in __libc_start_main () from /lib/i686/cmov/libc.so.6
#3  0x08048851 in _start ()
(gdb) bt full
#0  0xb7e4fdfd in getc () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#1  0x0804a0a8 in main (argc=2, argv=0xbff033d0) at xxd.c:732
        fp = (FILE *) 0x804c02e
        fpo = (FILE *) 0xb7f374e0
        c = 952
        e = 19
        p = 105
        relseek = 1
        negseek = 0
        revert = 0
        cols = 145
        nonzero = 50
        autoskip = 0
        hextype = 3
        ebcdic = 0
        octspergrp = 1
        grplen = 9
        length = -1
        n = 105
        seekoff = 0
        l = "0000000: 01111111 01000101 01001100 01000110 00000001 00000001 00000001 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000010 00000000 00000011 00000000 00000001 00"...
        pname = 0xbff035ee "xxd"
        pp = 0xbff035fc "/usr/bin/xxd"
#2  0xb7e04450 in __libc_start_main () from /lib/i686/cmov/libc.so.6
No symbol table info available.
#3  0x08048851 in _start ()
No symbol table info available.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20071129/f78ebee5/attachment.pgp 


More information about the pkg-vim-maintainers mailing list