Wireshark-bugs: [Wireshark-bugs] [Bug 4409] New: minor bug in bgp dissector

Date: Wed, 20 Jan 2010 07:08:40 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4409

           Summary: minor bug in bgp dissector
           Product: Wireshark
           Version: 1.2.2
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Minor
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: maximivanov@xxxxxxx


Build Information:
Version 1.2.2 (SVN Rev 29910)

Copyright 1998-2009 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 GTK+ 2.16.2, with GLib 2.20.3, with WinPcap (version unknown),
with libz 1.2.3, without POSIX capabilities, with libpcre 7.0, with SMI 0.4.8,
with c-ares 1.6.0, with Lua 5.1, with GnuTLS 2.8.1, with Gcrypt 1.4.4, with MIT
Kerberos, with GeoIP, with PortAudio V19-devel (built Sep 14 2009), with
AirPcap.

Running on Windows XP Service Pack 2, build 2600, with WinPcap version 4.1
beta5
(packet.dll version 4.1.0.1452), based on libpcap version 1.0.0, GnuTLS 2.8.1,
Gcrypt 1.4.4, without AirPcap.

Built using Microsoft Visual C++ 9.0 build 30729

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

Check the man page and http://www.wireshark.org for more information.
--
file epan/dissectors/packet-bgp.h contain declaration of BGP_EXT_COM_LINKBAND 

#define BGP_EXT_COM_LINKBAND    0x0004  /* Link Bandwidth,Format
AS(2B):Bandwidth(4B) */

and file epan/dissectors/packet-bgp.c contain code

case BGP_EXT_COM_LINKBAND:
   is_extended_type = TRUE;
   linkband = tvb_get_ntohieee_float(tvb,q+2);
   ...
   break;

But code must be   

unsigned short as_num;
...
case BGP_EXT_COM_LINKBAND:
   is_extended_type = TRUE;
   as_num = tvb_get_ntohs(tvb,q+2);
   linkband = tvb_get_ntohieee_float(tvb,q+4);
   ...
   break;   

See comment in declaration of BGP_EXT_COM_LINKBAND

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