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:
71fe97a
)
avformat/rmdec: check that sub_packet_size fit in the packet for DEINT_ID_GENR
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 6 Jan 2014 21:58:24 +0000
(22:58 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 6 Jan 2014 23:26:33 +0000
(
00:26
+0100)
Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7fa8c49400d0_3923_audiosig.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rmdec.c
patch
|
blob
|
history
diff --git
a/libavformat/rmdec.c
b/libavformat/rmdec.c
index
8feef54
..
b1025a5
100644
(file)
--- a/
libavformat/rmdec.c
+++ b/
libavformat/rmdec.c
@@
-270,6
+270,8
@@
static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
if (ast->sub_packet_size <= 0 ||
ast->sub_packet_size > ast->audio_framesize)
return AVERROR_INVALIDDATA;
+ if (ast->audio_framesize % ast->sub_packet_size)
+ return AVERROR_INVALIDDATA;
break;
case DEINT_ID_SIPR:
case DEINT_ID_INT0: