[FFmpeg-cvslog] Check for unsupported parameters in ff_j2k_dwt_init()
Laurent Aimar
git at videolan.org
Thu Sep 29 06:12:07 CEST 2011
ffmpeg | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Sep 29 01:04:54 2011 +0200| [b4483a531a139f304f4370f470325facb107202f] | committer: Michael Niedermayer
Check for unsupported parameters in ff_j2k_dwt_init()
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4483a531a139f304f4370f470325facb107202f
---
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;
More information about the ffmpeg-cvslog
mailing list