aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gtp.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-06-14 18:18:05 +0000
committerGerald Combs <gerald@wireshark.org>2005-06-14 18:18:05 +0000
commitb94621701c06bf867ba87f7ceeb93a7ab86105aa (patch)
tree145674137d6f3d91449ff72c09fca92c9450bdd8 /epan/dissectors/packet-gtp.c
parent8063b6d0df8bfbfb4eff12db3ae600fbbb6243a8 (diff)
From Steve Grubb:
Fix bounds checking in lemon.c. Fix up an if/else block in packet-dcerpc-samr.c. Fix hex printing in packet-gtp.c. Fix other problems discovered by Steve: Fix a bounds check in packet-isis-lsp.c. Also, fix netmask printing on non-little-endian machines. Add a comment about adding a netmask routine to to_str.c. Add bounds checks to packet-ncp2222.inc. All of these apply to bug 217. svn path=/trunk/; revision=14627
Diffstat (limited to 'epan/dissectors/packet-gtp.c')
-rw-r--r--epan/dissectors/packet-gtp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
index bd6a614e68..c893e815b9 100644
--- a/epan/dissectors/packet-gtp.c
+++ b/epan/dissectors/packet-gtp.c
@@ -1365,9 +1365,9 @@ id_to_str(const guint8 *ad) {
for (i = 0; i < 8; i++) {
bits8to5 = (ad[i] >> 4) & 0x0F;
bits4to1 = ad[i] & 0x0F;
- if (bits8to5 < 0xA)
- str[j++] = hex_digits[bits4to1];
if (bits4to1 < 0xA)
+ str[j++] = hex_digits[bits4to1];
+ if (bits8to5 < 0xA)
str[j++] = hex_digits[bits8to5];
}
str[j] = '\0';