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:
Michael Niedermayer
2025-10-30 23:05:57 +01:00
parent 56913de807
commit c0bf64e009

View File

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