ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] Bug in packet-wlancap.c?

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Stuffed Crust <pizza@xxxxxxxxxxxx>
Date: Tue, 5 Aug 2003 14:34:55 -0400
On Tue, Aug 05, 2003 at 10:17:12AM -0700, Guy Harris wrote:
> > I have taken a look into 'packet-wlancap.c' and after changing the 
> > definition of the 'ssi_signal' field from signed to unsigned (lines
> > 163+246), ethereal's dump looked as I expected it. 
> 
> I don't know either, but, given that the creator of the AVS capture
> frame format and the author of packet-wlancap.c are the same person,
> I'll CC him on this, in case he's not on ethereal-dev.

Yeah, this is definatley a bug in the dissector.

A patch to fix it is attached, it's as Mr. Arnold suggested.

Good eyes.  :)

 - Solomon
-- 
Solomon Peachy                                   pizza@f*cktheusers.org
                                                           ICQ #1318444
Quidquid latine dictum sit, altum viditur                 Melbourne, FL
Index: packet-wlancap.c
===================================================================
RCS file: /cvsroot/ethereal/packet-wlancap.c,v
retrieving revision 1.1
diff -u -r1.1 packet-wlancap.c
--- packet-wlancap.c	6 Nov 2002 21:49:29 -0000	1.1
+++ packet-wlancap.c	5 Aug 2003 18:36:17 -0000
@@ -160,7 +160,7 @@
 			   NULL, 0x0, "", HFILL } },
     { &hf_wlan_ssi_type, { "SSI Type", "wlancap.ssi_type", FT_UINT32, BASE_DEC,
 			   VALS(ssi_type), 0x0, "", HFILL } },
-    { &hf_wlan_ssi_signal, { "SSI Signal", "wlancap.ssi_signal", FT_UINT32, 
+    { &hf_wlan_ssi_signal, { "SSI Signal", "wlancap.ssi_signal", FT_INT32, 
 			     BASE_DEC, NULL, 0x0, "", HFILL } },
     { &hf_wlan_ssi_noise, { "SSI Noise", "wlancap.ssi_noise", FT_INT32, 
 			    BASE_DEC, NULL, 0x0, "", HFILL } },
@@ -243,8 +243,8 @@
 			  4, tvb_get_ntohl(tvb, offset));
       offset+=4;
       /* XXX cook ssi_signal (Based on type; ie format) */
-      proto_tree_add_uint(wlan_tree, hf_wlan_ssi_signal, tvb, offset,
-			  4, tvb_get_ntohl(tvb, offset));
+      proto_tree_add_int(wlan_tree, hf_wlan_ssi_signal, tvb, offset,
+			 4, tvb_get_ntohl(tvb, offset));
       offset+=4;
       /* XXX cook ssi_noise (Based on type; ie format) */
       proto_tree_add_int(wlan_tree, hf_wlan_ssi_noise, tvb, offset,

Attachment: pgpdMz9wj1VoL.pgp
Description: PGP signature