Skip to content
Snippets Groups Projects
Commit 3ef6c526 authored by Anton Khirnov's avatar Anton Khirnov
Browse files

a64: check that extradata exists before reading from it

parent b1365649
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,12 @@ static int a64_write_header(AVFormatContext *s) ...@@ -35,6 +35,12 @@ static int a64_write_header(AVFormatContext *s)
0x00, //charset_lifetime (multi only) 0x00, //charset_lifetime (multi only)
0x00 //fps in 50/fps; 0x00 //fps in 50/fps;
}; };
if (avctx->extradata_size < 4) {
av_log(s, AV_LOG_ERROR, "Missing extradata\n");
return AVERROR(EINVAL);
}
switch (avctx->codec->id) { switch (avctx->codec->id) {
case AV_CODEC_ID_A64_MULTI: case AV_CODEC_ID_A64_MULTI:
header[2] = 0x00; header[2] = 0x00;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment