# HG changeset patch # User rtognimp # Date 1105747658 0 # Node ID 4b350cc506a70426761d7f1c2e8a76728ab3dd15 # Parent 548c87c06dbb5fdf150f765fb72d0e2c500b1549 Use avcodec_check_dimensions instead of custom hack diff -r 548c87c06dbb -r 4b350cc506a7 8bps.c --- a/8bps.c Fri Jan 14 23:48:12 2005 +0000 +++ b/8bps.c Sat Jan 15 00:07:38 2005 +0000 @@ -160,8 +160,7 @@ c->pic.data[0] = NULL; - // FIXME: find a better way to prevent integer overflow - if (((unsigned int)avctx->width > 32000) || ((unsigned int)avctx->height > 32000)) { + if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { av_log(avctx, AV_LOG_ERROR, "Bad image size (w = %d, h = %d).\n", avctx->width, avctx->height); return 1; } diff -r 548c87c06dbb -r 4b350cc506a7 lcl.c --- a/lcl.c Fri Jan 14 23:48:12 2005 +0000 +++ b/lcl.c Sat Jan 15 00:07:38 2005 +0000 @@ -640,9 +640,7 @@ return 1; } - // FIXME: find a better way to prevent integer overflow - if (((unsigned int)avctx->width > 32000) || ((unsigned int)avctx->height > 32000)) { - av_log(avctx, AV_LOG_ERROR, "Bad image size (w = %d, h = %d).\n", avctx->width, avctx->height); + if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) { return 1; }