aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2008-02-19 22:09:38 +0000
committerJörg Mayer <jmayer@loplof.de>2008-02-19 22:09:38 +0000
commit317605de9a889a1d28aa17401a2059941b098359 (patch)
tree02f6b600e60c1a4361972b1e0d05816d1eba022f /epan
parent0fbcd0e4d174027f5ee4daddab4daae289af7bf4 (diff)
Use the right 4 bits and avoid the overflow of an 8 bit value
svn path=/trunk/; revision=24396
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-atm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index 9034845cbe..0b5165fa10 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -1394,7 +1394,7 @@ dissect_atm_cell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
octet = tvb_get_guint8(tvb, 0);
proto_tree_add_text(atm_tree, tvb, 0, 1, "GFC: 0x%x", octet >> 4);
- vpi = (octet & 0xF0) << 4;
+ vpi = (octet & 0xF) << 4;
octet = tvb_get_guint8(tvb, 1);
vpi |= octet >> 4;
proto_tree_add_uint(atm_tree, hf_atm_vpi, tvb, 0, 2, vpi);