aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/wimax
diff options
context:
space:
mode:
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-07-11 16:03:06 +0000
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>2008-07-11 16:03:06 +0000
commitad684a9b044e1b553823bcd0a5f84e196665150c (patch)
treef39ead35d0b1b194b48e52e6080749696bab9f5a /plugins/wimax
parent6a7e40f13038e8bb0938aea9e29bc04e2ebbfcfc (diff)
From Frank Wang:
The ULMAP decoder can get a wrong bit offset when decoding CQICH_Alloc_IE. The finishing position shoud not pad to byte but pad to the length specified, which can be nibble aligned. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@25703 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'plugins/wimax')
-rw-r--r--plugins/wimax/msg_ulmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/wimax/msg_ulmap.c b/plugins/wimax/msg_ulmap.c
index e52cc4e746..5eb56f75d2 100644
--- a/plugins/wimax/msg_ulmap.c
+++ b/plugins/wimax/msg_ulmap.c
@@ -1163,6 +1163,7 @@ gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gi
/* offset of TLV in nibbles, length of TLV in nibbles */
gint bit;
gint data;
+ gint target;
proto_item *ti = NULL;
proto_item *tree = NULL;
gint rci, rtype, ftype, zperm, mgi, api, pad;
@@ -1174,6 +1175,7 @@ gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gi
XBIT(data, 4, "Extended UIUC");
XBIT(data, 4, "Length");
+ target = bit + BYTE_TO_BIT(data);
if (cqich_id_size == 0) {
proto_tree_add_text(tree, tvb, BITHI(bit, 1), "CQICH_ID: n/a (size == 0 bits)");
@@ -1218,7 +1220,7 @@ gint CQICH_Alloc_IE(proto_tree *uiuc_tree, const guint8 *bufptr, gint offset, gi
}
XBIT(data, 2, "MIMO_permutation_feedback_cycle");
- pad = BIT_PADDING(bit,8);
+ pad = target - bit;
if (pad) {
proto_tree_add_text(tree, tvb, BITHI(bit, pad), "Padding: %d bits", pad);
bit += pad;