aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Aimar <fenrir@videolan.org>2011-09-29 01:04:54 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-09-29 06:11:18 +0200
commitb4483a531a139f304f4370f470325facb107202f (patch)
tree40ee50738564c529e2f4b9573c1dd433d47675ec
parent02660a871301adada14b0e0fe64c66f73c2e4541 (diff)
downloadffmpeg-b4483a531a139f304f4370f470325facb107202f.tar.gz
Check for unsupported parameters in ff_j2k_dwt_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/j2k_dwt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/j2k_dwt.c b/libavcodec/j2k_dwt.c
index 9ba770ad83..ab7a1ab757 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;