diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-16 04:16:01 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-12 21:52:31 +0100 |
commit | 56173eabb6fb508574150098ac835b3b3e6a8569 (patch) | |
tree | 4220ade2559130fac5df51316c7cd3cf6bf1280f | |
parent | d80db23e7d3130ee5f5f6fff7e6db3274cdd6a98 (diff) | |
download | ffmpeg-56173eabb6fb508574150098ac835b3b3e6a8569.tar.gz |
j2kdec: Fix integer overflow leading to a segfault
Fixes Ticket776
Bug found by: Diana Elena Muscalu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1f99939a6361e2e6d6788494dd7c682b051c6c34)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/j2k_dwt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/j2k_dwt.c b/libavcodec/j2k_dwt.c index ab7a1ab757..48aa33735e 100644 --- a/libavcodec/j2k_dwt.c +++ b/libavcodec/j2k_dwt.c @@ -321,7 +321,7 @@ 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) + if ((unsigned)decomp_levels >= FF_DWT_MAX_DECLVLS) return AVERROR_INVALIDDATA; s->ndeclevels = decomp_levels; s->type = type; |