Wireshark-bugs: [Wireshark-bugs] [Bug 6354] New: Calling proto_tree_add_item with FT_BYTES causi

Date: Sun, 18 Sep 2011 19:17:32 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6354

           Summary: Calling proto_tree_add_item with FT_BYTES causing
                    failed assertion
           Product: Wireshark
           Version: 1.6.2
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: cajayi146@xxxxxxxxx


Created an attachment (id=7040)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=7040)
Screen shot of wireshark displayed error

Build Information:
Version 1.6.2 (SVN Rev 38931 from /trunk-1.6)

Copyright 1998-2011 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 GTK+ 2.22.1, with GLib 2.26.1, with WinPcap (version
unknown), with libz 1.2.5, without POSIX capabilities, without libpcre, with
SMI
0.4.8, with c-ares 1.7.1, with Lua 5.1, without Python, with GnuTLS 2.10.3,
with
Gcrypt 1.4.6, with MIT Kerberos, with GeoIP, with PortAudio V19-devel (built
Sep
 7 2011), with AirPcap.

Running on Windows XP Service Pack 3, build 2600, with WinPcap version 4.1.2
(packet.dll version 4.1.0.2001), based on libpcap version 1.0 branch 1_0_rel0b
(20091008), GnuTLS 2.10.3, Gcrypt 1.4.6, without AirPcap.

Built using Microsoft Visual C++ 9.0 build 21022

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.
--
I have built a plugin using the current release build 1.7.0 trunk 39030.  The
dissector works just fine in the development version but when placed in the
1.6.2 plugin directory, I get proto.c:1368: failed assertion "length=6".  I
have traced the error to the code snippet below.  I looked at other source
examples and I can't find anything wrong with this code.  The error only
happens when using FT_BYTES type.

Here are my code snippets

 { &hf_digest_value,
                        { "Digest Value", "ieee16092.digest", FT_BYTES,
BASE_NONE, NULL, 0x0,          
                                NULL, HFILL }},

proto_tree_add_item(ieee16092_tree, hf_digest_value, tvb, offset, 8, ENC_NA);
//
offset+= 8;

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