mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avformat/rtmpproto_ Check tcurl and flashver length
Fixes: out of array accesses
Reviewed-by: Joshua Rogers <joshua@joshua.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a64e037429)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -2833,6 +2833,12 @@ reconnect:
|
||||
"FMLE/3.0 (compatible; %s)", LIBAVFORMAT_IDENT);
|
||||
}
|
||||
}
|
||||
if ( strlen(rt->flashver) > FLASHVER_MAX_LENGTH
|
||||
|| strlen(rt->tcurl ) > TCURL_MAX_LENGTH
|
||||
) {
|
||||
ret = AVERROR(EINVAL);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
rt->receive_report_size = 1048576;
|
||||
rt->bytes_read = 0;
|
||||
|
||||
Reference in New Issue
Block a user