[FFmpeg-cvslog] omadec: Fix wrong number of array elements

Michael Niedermayer git at videolan.org
Sun Jan 12 16:28:07 CET 2014


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 24 15:24:24 2013 +0200| [35f9a0896ee6858114831a5a8e951872e4473a75] | committer: Reinhard Tartler

omadec: Fix wrong number of array elements

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: David Goldwich <david.goldwich at gmail.com>
CC:libav-stable at libav.org
Signed-off-by: Anton Khirnov <anton at khirnov.net>
(cherry picked from commit 97f50e92b5cf3b47a76f75d76ed4340e822030db)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35f9a0896ee6858114831a5a8e951872e4473a75
---

 libavformat/omadec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index 158e1a6..e3b1518 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -263,7 +263,7 @@ static int decrypt_init(AVFormatContext *s, ID3v2ExtraMeta *em, uint8_t *header)
                 !nprobe(s, gdata, geob->datasize, oc->n_val))
                 break;
         }
-        if (i >= sizeof(leaf_table)) {
+        if (i >= FF_ARRAY_ELEMS(leaf_table)) {
             av_log(s, AV_LOG_ERROR, "Invalid key\n");
             return -1;
         }



More information about the ffmpeg-cvslog mailing list