OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c09bb23
)
avformat/mov: check avio_read() return in mov_read_dref()
author
Michael Niedermayer
<michaelni@gmx.at>
Fri, 27 Dec 2013 22:35:46 +0000
(23:35 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 27 Dec 2013 22:37:17 +0000
(23:37 +0100)
Fixes: msan_uninit-mem_7f4960453a02_7264_mr_cork_jpeg.mov
Fixes use of uninitialized memory
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mov.c
patch
|
blob
|
history
diff --git
a/libavformat/mov.c
b/libavformat/mov.c
index
940393d
..
be602ee
100644
(file)
--- a/
libavformat/mov.c
+++ b/
libavformat/mov.c
@@
-537,7
+537,8
@@
static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
dref->dir = av_malloc(len+1);
if (!dref->dir)
return AVERROR(ENOMEM);
- avio_read(pb, dref->dir, len);
+ if (avio_read(pb, dref->dir, len) != len)
+ return AVERROR_INVALIDDATA;
dref->dir[len] = 0;
for (j = 0; j < len; j++)
if (dref->dir[j] == ':')