diff options
author | Laurent Aimar <fenrir@videolan.org> | 2011-09-29 01:04:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-29 06:11:18 +0200 |
commit | b4483a531a139f304f4370f470325facb107202f (patch) | |
tree | 40ee50738564c529e2f4b9573c1dd433d47675ec /libavcodec/j2k_dwt.c | |
parent | 02660a871301adada14b0e0fe64c66f73c2e4541 (diff) | |
download | ffmpeg-streaming-b4483a531a139f304f4370f470325facb107202f.zip ffmpeg-streaming-b4483a531a139f304f4370f470325facb107202f.tar.gz |
Check for unsupported parameters in ff_j2k_dwt_init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/j2k_dwt.c')
-rw-r--r-- | 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; |