[FFmpeg-cvslog] j2kdec: Fix integer overflow leading to a segfault
Michael Niedermayer
git at videolan.org
Fri Dec 16 04:58:40 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Dec 16 04:16:01 2011 +0100| [1f99939a6361e2e6d6788494dd7c682b051c6c34] | committer: Michael Niedermayer
j2kdec: Fix integer overflow leading to a segfault
Fixes Ticket776
Bug found by: Diana Elena Muscalu
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1f99939a6361e2e6d6788494dd7c682b051c6c34
---
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 ab7a1ab..48aa337 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;
More information about the ffmpeg-cvslog
mailing list