Skip to content

Commit

Permalink
ZBEE-TLV: Avoid undefined shift (CID 1545113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Mathieson committed Nov 23, 2024
1 parent 610c33d commit 1bacbae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions epan/dissectors/packet-zbee-tlv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ dissect_zdp_local_tlv (tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
static unsigned
dissect_zbee_tlv_chanmask(proto_tree *tree, tvbuff_t *tvb, unsigned offset, int hf_page, int hf_channel)
{
int i;
uint32_t i;
uint32_t mask;
uint8_t page;
proto_item *ti;
Expand Down Expand Up @@ -1245,7 +1245,7 @@ dissect_zbee_tlv_chanmask(proto_tree *tree, tvbuff_t *tvb, unsigned offset, int
*/
if ((2 << i) & mask)
{
while ((2 << i) & mask) i++;
while ((i<32) && ((2 << i) & mask)) i++;
proto_item_append_text(ti, "-%d", i);
}
}
Expand Down

0 comments on commit 1bacbae

Please sign in to comment.