mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-24 08:48:37 +00:00
avformat/rtspdec: bound Content-Length in the ANNOUNCE handler to SDP_MAX_SIZE
Reported by Franciszek Kalinowski (isec.pl / striga.ai) and Bartosz Smigielski.
This commit is contained in:
committed by
michaelni
parent
0cf9169c85
commit
6049b4d7bc
@@ -191,7 +191,7 @@ static int rtsp_read_announce(AVFormatContext *s)
|
||||
rtsp_send_reply(s, RTSP_STATUS_SERVICE, NULL, request.seq);
|
||||
return AVERROR_OPTION_NOT_FOUND;
|
||||
}
|
||||
if (request.content_length > 0) {
|
||||
if (request.content_length > 0 && request.content_length <= SDP_MAX_SIZE) {
|
||||
sdp = av_malloc(request.content_length + 1);
|
||||
if (!sdp)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
Reference in New Issue
Block a user