Ethereal-dev: [Ethereal-dev] GTP tr_comm has bug

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

From: Budiyanto Fritz <fritzb88@xxxxxxxxx>
Date: Thu, 31 Oct 2002 00:57:37 -0800 (PST)
decode_gtp_tr_comm has a bug, transfer command is a
guint8, and tvb_get_ntohl is wrongly used to retreive
this value. Here is the fix:

Index: packet-gtp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-gtp.c,v
retrieving revision 1.40
diff -u -r1.40 packet-gtp.c
--- packet-gtp.c        2002/10/26 06:30:41     1.40
+++ packet-gtp.c        2002/10/31 08:50:22
@@ -3061,7 +3061,7 @@
 
        guint8  tr_command;
 
-       tr_command = tvb_get_ntohl(tvb, offset+1);
+       tr_command = tvb_get_guint8(tvb, offset+1);
 
        proto_tree_add_uint(tree, gtp_version ?
hf_gtpv1_tr_comm : hf_gtpv0_tr_comm, tvb, offset, 2,
tr_command);
 

__________________________________________________
Do you Yahoo!?
HotJobs - Search new jobs daily now
http://hotjobs.yahoo.com/
Index: packet-gtp.c
===================================================================
RCS file: /cvsroot/ethereal/packet-gtp.c,v
retrieving revision 1.40
diff -u -r1.40 packet-gtp.c
--- packet-gtp.c	2002/10/26 06:30:41	1.40
+++ packet-gtp.c	2002/10/31 08:50:22
@@ -3061,7 +3061,7 @@
 
 	guint8	tr_command;
 
-	tr_command = tvb_get_ntohl(tvb, offset+1);
+	tr_command = tvb_get_guint8(tvb, offset+1);
 
 	proto_tree_add_uint(tree, gtp_version ? hf_gtpv1_tr_comm : hf_gtpv0_tr_comm, tvb, offset, 2, tr_command);