omadec: make sample rate table large enough to prevent out of array reading.
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Apr 2012 16:13:51 +0000 (18:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Apr 2012 16:36:39 +0000 (18:36 +0200)
The new values lead to error messages when used

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oma.c
libavformat/oma.h

index 30e86f1..d4dfb1a 100644 (file)
@@ -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  },
index bac8bcb..1f0ddf9 100644 (file)
@@ -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[];