summaryrefslogtreecommitdiff
path: root/plugins/wimax/msg_ulmap.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2008-07-11 16:03:06 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2008-07-11 16:03:06 +0000
commit77c287a58c41487bfb9ec3e8637efc323fbef895 (patch)
treef39ead35d0b1b194b48e52e6080749696bab9f5a /plugins/wimax/msg_ulmap.c
parent0c18cbc98f9b835778d562b56a5848de8bae0516 (diff)
downloadwireshark-77c287a58c41487bfb9ec3e8637efc323fbef895.tar.gz
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. svn path=/trunk/; revision=25703
Diffstat (limited to 'plugins/wimax/msg_ulmap.c')
-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;