mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
avformat/rtpenc_xiph: bail out when the max payload size underflows
Reported by Franciszek Kalinowski (isec.pl / striga.ai) and Bartosz Smigielski.
(cherry picked from commit 0857141823)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
88c482d7b7
commit
ccae7f536b
@@ -38,6 +38,10 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size)
|
||||
uint8_t *q;
|
||||
|
||||
max_pkt_size = s->max_payload_size - 6; // ident+frag+tdt/vdt+pkt_num+pkt_length
|
||||
if (max_pkt_size <= 0) {
|
||||
av_log(s1, AV_LOG_ERROR, "Max payload size too small for Xiph RTP\n");
|
||||
return;
|
||||
}
|
||||
|
||||
// set xiph data type
|
||||
switch (*buff) {
|
||||
|
||||
Reference in New Issue
Block a user