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>
This commit is contained in:
Michael Niedermayer
2025-10-30 23:05:57 +01:00
parent fa959bb135
commit a64e037429

View File

@@ -2859,6 +2859,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;