Wireshark-bugs: [Wireshark-bugs] [Bug 2062] New: SNMP (libsmi) register_mibs() related crash
Date: Sun, 2 Dec 2007 12:40:25 +0000 (GMT)
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2062

           Summary: SNMP (libsmi) register_mibs() related crash
           Product: Wireshark
           Version: 0.99.7
          Platform: PC
        OS/Version: OpenBSD
            Status: NEW
          Severity: Major
          Priority: High
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: nikns@xxxxxxxxx


Build Information:
TShark 0.99.7pre2

Copyright 1998-2007 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 with GLib 2.12.13, with libpcap 0.5, with libz 1.2.3, with libpcre
7.4,
with SMI 0.4.3, with ADNS, with Lua 5.1, with GnuTLS 2.0.3, with Gcrypt 1.2.4,
with Heimdal Kerberos.

Running on OpenBSD 4.2, with OpenBSD libpcap.

Built using gcc 3.3.5 (propolice).

--
# tshark
Unhandled exception ("proto.c:3780: failed assertion "hfinfo->name &&
hfinfo->name[0]"", group=1, code=4)
Abort trap (core dumped) 

(gdb) bt
#0  0x0000000042d7fb2a in kill () from /usr/lib/libc.so.42.0
#1  0x0000000042dc6485 in abort () at /usr/src/lib/libc/stdlib/abort.c:68
#2  0x0000000051141f68 in unhandled_catcher () from
../epan/.libs/libwireshark.so.1.0
#3  0x0000000051141f27 in do_throw () from ../epan/.libs/libwireshark.so.1.0
#4  0x00000000511420c3 in except_throw () from
../epan/.libs/libwireshark.so.1.0
#5  0x00000000511574f4 in proto_register_field_init () from
../epan/.libs/libwireshark.so.1.0
#6  0x00000000511573fd in proto_register_field_array () from
../epan/.libs/libwireshark.so.1.0
#7  0x0000000051146c2c in register_mibs () from
../epan/.libs/libwireshark.so.1.0
#8  0x0000000051147139 in oids_init () from ../epan/.libs/libwireshark.so.1.0
#9  0x0000000051141996 in epan_init () from ../epan/.libs/libwireshark.so.1.0
#10 0x000000000041969e in main ()


The problem is that register_mibs() uses dynamic array when calling
proto_register_field_array(), which works fine only with static arrays, as
comment for proto_register_field_array() tells:
/* for use with static arrays only, since we don't allocate our own copies
of the header_field_info struct contained within the hf_register_info struct */


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