Wireshark-bugs: [Wireshark-bugs] [Bug 5148] New: Core dump in PostScript output when reading fro

Date: Thu, 26 Aug 2010 11:48:49 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5148

           Summary: Core dump in PostScript output when reading from pipe
           Product: Wireshark
           Version: 1.2.10
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Low
         Component: TShark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: psfales@xxxxxxxxxxxxxxxxxx


Build Information:
TShark 1.2.10 (SVN Rev 33656)

Copyright 1998-2010 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (32-bit) with GLib 2.16.6, with libpcap 0.9.5, with libz 1.2.3,
without
POSIX capabilities, with libpcre 7.8, with SMI 0.4.8, with c-ares 1.5.3, with
Lua 5.1, with GnuTLS 2.6.2, with Gcrypt 1.4.3, with MIT Kerberos, without
GeoIP.

Running on Darwin 9.8.0 (MacOS 10.5.8), with libpcap version 0.9.5, GnuTLS
2.6.2, Gcrypt 1.4.3.

Built using gcc 4.0.1 (Apple Inc. build 5488).

--
The following command will core dump.   (It also core dumps when a capture file
is used instead of /dev/null.   This is just an easy way to demonstrate the
problem.)

tshark -V -T ps -i - < /dev/null
%!
%!PS-Adobe-2.0
%
(a bunch of PostScript)
%% the page title
Bus error


The error does not occur with -T text, -T psml, or -T pdml.


The problem was reproduced using the official download of 1.2.10 from
wireshark.org.   However, it also occurs in our built-from-source version 1.2.4
on darwin and linux.   The 1.2.4 backtrace is:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 23345)]
0x080541b6 in ps_clean_string (out=0xbfffdd50 "pÝÿ¿À!\227Aì", in=0x0, 
    outbuf_size=256) at print.c:921
921                     c = in[rd];
(gdb) bt
#0  0x080541b6 in ps_clean_string (out=0xbfffdd50 "pÝÿ¿À!\227Aì", in=0x0, 
    outbuf_size=256) at print.c:921
#1  0x080545b3 in print_preamble_ps (self=0x8723d70, filename=0x0)
    at print.c:1116
#2  0x08054235 in print_preamble (self=0x8723d70, filename=0x0) at print.c:945
#3  0x0806c3d4 in write_preamble (cf=0x0) at tshark.c:2572
#4  0x0806b336 in main (argc=6, argv=0xbfffe004) at tshark.c:1606
(gdb)

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.