projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b136564
)
a64: check that extradata exists before reading from it
author
Anton Khirnov
<anton@khirnov.net>
Sat, 3 May 2014 08:44:17 +0000
(10:44 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Sun, 18 May 2014 08:20:19 +0000
(10:20 +0200)
libavformat/a64.c
patch
|
blob
|
history
diff --git
a/libavformat/a64.c
b/libavformat/a64.c
index
640e786
..
da8e310
100644
(file)
--- a/
libavformat/a64.c
+++ b/
libavformat/a64.c
@@
-35,6
+35,12
@@
static int a64_write_header(AVFormatContext *s)
0x00, //charset_lifetime (multi only)
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) {
case AV_CODEC_ID_A64_MULTI:
header[2] = 0x00;