avformat/mmst: Fail when the ASF header has no packet size or no streams

The fix is the one recommended in the report.

Fixes: NULL pointer dereference
Fixes: 1eA5JUo2ED6K
Fixes: AISLE-2026-0111-00154
NULL pointer dereference Replicated through UnModified FFmpeg with ASAN,UBSAN
Found-by: Joshua Rogers <joshua.rogers@aisle.com>
This commit is contained in:
Michael Niedermayer authored and michaelni committed 2026-10-11 01:31:37 +00:00
1 parent a487fcd268
commit 94c3187ef7
1 file changed
+3 -1
+3 -1
View File
@@ -567,8 +567,10 @@ static int mms_open(URLContext *h, const char *uri, int flags)
}
mms->header_parsed = 1;
if (!mms->asf_packet_len || !mms->stream_num)
if (!mms->asf_packet_len || !mms->stream_num) {
err = AVERROR_INVALIDDATA;
goto fail;
}
clear_stream_buffers(mms);
err = mms_safe_send_recv(mmst, send_stream_selection_request, SC_PKT_STREAM_ID_ACCEPTED);