From 0d8be1fb797b3d65f1c2c204da76af8e8de6d3cc Mon Sep 17 00:00:00 2001 From: John Thacker Date: Tue, 25 May 2021 08:18:22 -0400 Subject: [PATCH] DVB-S2-BB: Prevent infinite loop Commit 4bf4ee88f0544727e7f89f3f288c6afd2f650a4c removed an else statement that broke out of the BBFrame processing loop. Without it, infinite loops might be possible if the GSE frames have bit errors in the length field. (cherry picked from commit 0137c24d60934f131b25506a88c9464e4dc827de) --- epan/dissectors/packet-dvb-s2-bb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epan/dissectors/packet-dvb-s2-bb.c b/epan/dissectors/packet-dvb-s2-bb.c index 8449c959ed..90b15681cd 100644 --- a/epan/dissectors/packet-dvb-s2-bb.c +++ b/epan/dissectors/packet-dvb-s2-bb.c @@ -1257,6 +1257,8 @@ static int dissect_dvb_s2_bb(tvbuff_t *tvb, int cur_off, proto_tree *tree, packe bb_data_len -= sub_dissected; if (bb_data_len < DVB_S2_GSE_MINSIZE) bb_data_len = 0; + } else { + bb_data_len = 0; } } }