aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2023-03-08 15:44:17 -0800
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2023-03-09 09:40:31 +0000
commit9a63e4cf79052a7897db2f8f239b7a5249155f7e (patch)
tree3ffe4902154d51d843587595b6fa2fcb82eb2ab0
parent2a7e4982a55b0d8e1a22f42cf6bb1e410daa92c0 (diff)
ORAN FH CUS: Add an array length check
Fixes #18895.
-rw-r--r--epan/dissectors/packet-oran.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-oran.c b/epan/dissectors/packet-oran.c
index d78790b7e7..0a75ecb898 100644
--- a/epan/dissectors/packet-oran.c
+++ b/epan/dissectors/packet-oran.c
@@ -1617,7 +1617,7 @@ static int dissect_oran_c_section(tvbuff_t *tvb, proto_tree *tree, packet_info *
ext11_settings.ext6_rbg_size = 16; break;
/* N.B., encoded in 3 bits, so no other values are possible */
}
- for (guint n=0; n < 28; n++) {
+ for (guint n=0; n < 28 && ext11_settings.ext6_num_bits_set < 28; n++) {
if ((rbgMask >> n) & 0x01) {
ext11_settings.ext6_bits_set[ext11_settings.ext6_num_bits_set++] = n;
}