[FFmpeg-cvslog] omadec: make sample rate table large enough to prevent out of array reading .
Michael Niedermayer
git at videolan.org
Mon Apr 16 18:40:55 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Apr 16 18:13:51 2012 +0200| [a30165c4a8044e1d5527c1302b5a5cb473e0913d] | committer: Michael Niedermayer
omadec: make sample rate table large enough to prevent out of array reading.
The new values lead to error messages when used
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a30165c4a8044e1d5527c1302b5a5cb473e0913d
---
libavformat/oma.c | 2 +-
libavformat/oma.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/oma.c b/libavformat/oma.c
index 30e86f1..d4dfb1a 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -22,7 +22,7 @@
#include "oma.h"
#include "libavcodec/avcodec.h"
-const uint16_t ff_oma_srate_tab[6] = { 320, 441, 480, 882, 960, 0 };
+const uint16_t ff_oma_srate_tab[8] = { 320, 441, 480, 882, 960, 0, 0, 0};
const AVCodecTag ff_oma_codec_tags[] = {
{ CODEC_ID_ATRAC3, OMA_CODECID_ATRAC3 },
diff --git a/libavformat/oma.h b/libavformat/oma.h
index bac8bcb..1f0ddf9 100644
--- a/libavformat/oma.h
+++ b/libavformat/oma.h
@@ -37,7 +37,7 @@ enum {
OMA_CODECID_WMA = 5,
};
-extern const uint16_t ff_oma_srate_tab[6];
+extern const uint16_t ff_oma_srate_tab[8];
extern const AVCodecTag ff_oma_codec_tags[];
More information about the ffmpeg-cvslog
mailing list