Wireshark-dev: [Wireshark-dev] [PATCH] DMP - Fix for long SICs
From: "BRUMBY, Ian" <ian.brumby@xxxxxxxxxxxxxx>
Date: Tue, 24 Jul 2007 15:01:05 +1000
Problem: The DMP dissector fails to correctly decode 4 character and
longer SICs.

First reason:

There is a 32 bit overflow in the following code:
       p = (gint) pow (multiplier, no_char - 1 - i); Multiplier is
either 36.0 or 74.0, and "no_char" can be as high as 8.


Second reason:

An incorrect mask when decoding 4 character SICs (with characters
[A-Z0-9]) results in data being lost:
       bytes = 3;
       value = (tvb_get_ntohl (tvb, offset) >> 8) & 0x1FF; The first
line correctly indicates that there is 3 bytes worth of data, but the
mask only caters for 2 bytes.


Regards,
Ian Brumby
Software Engineer
BAE SYSTEMS
78 Northbourne Ave
Braddon ACT 2612
Australia

Attachment: packet-dmp.diff
Description: packet-dmp.diff