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
pull/1918/head
Donat Zenichev 2 months ago
parent 490b5af6f5
commit 2c4ca6191f

@ -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--);
}

Loading…
Cancel
Save