Summary: | netpbm-10.30-r1: pnmtopng segfaults | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Michael Mauch <michael.mauch> |
Component: | [OLD] Unspecified | Assignee: | Gentoo Graphics Project <graphics+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bookwood, rgo |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Fix for a problem.
pnm file that causes pnmtopng to segfault |
Description
Michael Mauch
2005-12-13 18:13:36 UTC
netpbm-10.31 pnmtopng also segfaults. This patch fix a problem: --- netpbm-10.31/converter/other/pnmtopng-orig.c 2005-12-29 16:35:13.000000000 +0000 +++ netpbm-10.31/converter/other/pnmtopng.c 2005-12-29 16:34:05.000000000 +0000 @@ -417,9 +417,9 @@ if (cmdlineP->rgbSpec) parseRgbOpt(rgb, &cmdlineP->rgb); - if (cmdlineP->modtimeSpec) + if (cmdlineP->modtimeSpec && modtime != NULL) parseModtimeOpt(modtime, &cmdlineP->modtime); if (cmdlineP->zlibCompression.levelSpec && cmdlineP->zlibCompression.level > 9) Created attachment 75718 [details, diff]
Fix for a problem.
This patch fix a problem for netpmb-10.31. I think for 10.30 it should work also.
Comment on attachment 75718 [details, diff]
Fix for a problem.
different issue, file a new bug report
post the actual files that are causing pnmtopng to segfault and the commands you used to make it segfault # pnmtopng /usr/share/netpbm/pcxstd.ppm Segmentation fault Created attachment 76436 [details]
pnm file that causes pnmtopng to segfault
works fine for me on x86 and amd64 ... your current gdb bt is useless though, so we'll need to generate a proper one ... do this: # CFLAGS='-g -O -pipe' FEATURES='nostrip' emerge netpbm # gdb --args pnmtopng /usr/share/netpbm/pcxstd.ppm Oh - it works fine if I use CFLAGS='-g -O -pipe'! Only with -O2 I get the segfault: # CFLAGS='-g -O2 -pipe' FEATURES='nostrip' emerge netpbm # gdb --args pnmtopng /usr/share/netpbm/pcxstd.ppm GNU gdb 6.4 [...] This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) run Starting program: /usr/bin/pnmtopng /usr/share/netpbm/pcxstd.ppm Program received signal SIGSEGV, Segmentation fault. 0x44077090 in rawmemchr () from /lib/tls/libc.so.6 (gdb) bt #0 0x44077090 in rawmemchr () from /lib/tls/libc.so.6 #1 0x4406e0a1 in _IO_list_resetlock () from /lib/tls/libc.so.6 #2 0x44063787 in vsscanf () from /lib/tls/libc.so.6 #3 0x4405ef9d in sscanf () from /lib/tls/libc.so.6 #4 0x0804d54d in main (argc=2, argv=0xbf820474) at pnmtopng.c:226 (gdb) can you try upgrading to 10.31 and see if that fixes things for you ? Yes, 10.31-r1 works fine with the -O2 flag. # locate .ppm | xargs -n 1 pnmtopng >/dev/null also worked fine, not a single segfault anymore. *** Bug 125915 has been marked as a duplicate of this bug. *** |