[FFmpeg-cvslog] diracdec: check xybsep
Michael Niedermayer
git at videolan.org
Wed Apr 18 17:15:56 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 18 16:49:46 2012 +0200| [601d072e68fb2967e561980336bea0b0625e629e] | committer: Michael Niedermayer
diracdec: check xybsep
Fixes division by 0
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=601d072e68fb2967e561980336bea0b0625e629e
---
libavcodec/diracdec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index b5395db..ad70fb2 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -856,7 +856,7 @@ static int dirac_unpack_prediction_parameters(DiracContext *s)
/*[DIRAC_STD] 11.2.4 motion_data_dimensions()
Calculated in function dirac_unpack_block_motion_data */
- if (s->plane[0].xbsep < s->plane[0].xblen/2 || s->plane[0].ybsep < s->plane[0].yblen/2) {
+ if (!s->plane[0].xbsep || !s->plane[0].ybsep || s->plane[0].xbsep < s->plane[0].xblen/2 || s->plane[0].ybsep < s->plane[0].yblen/2) {
av_log(s->avctx, AV_LOG_ERROR, "Block separation too small\n");
return -1;
}
More information about the ffmpeg-cvslog
mailing list