Wireshark-bugs: [Wireshark-bugs] [Bug 3128] New: SMPP optional parameter 'network_error_code' in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3128

           Summary: SMPP optional parameter 'network_error_code' incorrectly
                    decoded
           Product: Wireshark
           Version: 1.0.5
          Platform: PC
        OS/Version: Linux (other)
            Status: NEW
          Severity: Normal
          Priority: Medium
         Component: Wireshark
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Build Information:
(Problem is still in v1.0.5 sources and applies to all platforms/OSes)

Version 0.99.6.1

Copyright 1998-2007 Gerald Combs <[email protected]> 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 GTK+ 2.12.12, with GLib 2.16.6, with libpcap 0.9.8, with libz
1.2.3, without libpcre, with Net-SNMP 5.4.1, without ADNS, without Lua, without
GnuTLS, without Gcrypt, with MIT Kerberos, without PortAudio, without AirPcap.
NOTE: this build doesn't support the "matches" operator for Wireshark filter
syntax.

Running on Linux 2.6.27.5-37.fc9.i686, with libpcap version 0.9.8.

Built using gcc 4.3.0 20080428 (Red Hat 4.3.0-8).
--
The SMPP optional parameter 'network_error_code' is decoded incorrectly. This
field is present in SMPP (v3.4 and higher) deliver_sm messages containing a
delivery notification.

This TLV contains 3 bytes of data, which is decoded in two steps, each
adjusting the offset in the message. After that the offset is increased
*again*, causing the next TLVs to not recognised:

wireshark-1.0.5/epan/dissectors/packet-smpp.c line 1201:

            case  0x0423:       /* network_error_code   */
                smpp_handle_int1(sub_tree, tvb,
                                 hf_smpp_network_error_type, offset);
                smpp_handle_int2(sub_tree, tvb,
                                 hf_smpp_network_error_code, offset);
--->            (*offset) += length;
                break;

Removing the indicated increase in offset fixes the problem.


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