From 2c4ca6191fe618766f6f230f8752ccd9744fdba7 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Thu, 13 Mar 2025 09:35:01 +0100 Subject: [PATCH] MT#55283 codec: Integer handling issues (INTEGER_OVERFLOW) Fixes: *** CID 1638294: Integer handling issues (INTEGER_OVERFLOW) /daemon/codec.c: 4152 in packet_encoded_tx() 4146 ch->codec_output_rtp_seq(mp, &ch->csch, ch->handler, send_buf, inout->len, ch->csch.first_ts 4147 + fraction_divl(pkt->pts, cr_fact), 4148 ch->rtp_mark ? 1 : 0, 4149 payload_type, ts_delay); 4150 mp->ssrc_out->parent->seq_diff++; 4151 ch->rtp_mark = 0; >>> CID 1638294: Integer handling issues (INTEGER_OVERFLOW) >>> Expression "repeats--", where "repeats" is known to be equal to 0, underflows the type of "repeats--", which is type "unsigned int". 4152 } while (repeats--); 4153 } 4154 4155 4156 4157 Change-Id: I9a1087bd86851c872dcbfaac265c05f360c6e204 --- daemon/codec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemon/codec.c b/daemon/codec.c index d9ed1d461..629235dfc 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -4149,6 +4149,8 @@ static void packet_encoded_tx(AVPacket *pkt, struct codec_ssrc_handler *ch, stru payload_type, ts_delay); mp->ssrc_out->parent->seq_diff++; ch->rtp_mark = 0; + if (!repeats) + break; } while (repeats--); }