[FFmpeg-devel] [PATCH 6/6] Check for unsupported parameters in ff_j2k_dwt_init()
fenrir at elivagar.org
fenrir at elivagar.org
Thu Sep 29 01:04:54 CEST 2011
From: Laurent Aimar <fenrir at videolan.org>
---
libavcodec/j2k_dwt.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/j2k_dwt.c b/libavcodec/j2k_dwt.c
index 9ba770a..ab7a1ab 100644
--- a/libavcodec/j2k_dwt.c
+++ b/libavcodec/j2k_dwt.c
@@ -321,6 +321,8 @@ int ff_j2k_dwt_init(DWTContext *s, uint16_t border[2][2], int decomp_levels, int
int i, j, lev = decomp_levels, maxlen,
b[2][2];
+ if (decomp_levels >= FF_DWT_MAX_DECLVLS)
+ return AVERROR_INVALIDDATA;
s->ndeclevels = decomp_levels;
s->type = type;
--
1.7.2.5
More information about the ffmpeg-devel
mailing list