summaryrefslogtreecommitdiff
path: root/libavcodec/8bps.c
diff options
context:
space:
mode:
authorRoberto Togni <r_togni@tiscali.it>2005-01-15 00:07:38 +0000
committerRoberto Togni <r_togni@tiscali.it>2005-01-15 00:07:38 +0000
commit3048af835051b4245e51e63204fce72e7c71c8a4 (patch)
tree1ebbeff2e5ae8e2e61b470e037826b7913c46fef /libavcodec/8bps.c
parenta9c3ff5b9edbefd4914333fd6c99cc8aded1f269 (diff)
Use avcodec_check_dimensions instead of custom hack
Originally committed as revision 3836 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/8bps.c')
-rw-r--r--libavcodec/8bps.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 9adf4967c5..5123532d2d 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -160,8 +160,7 @@ static int decode_init(AVCodecContext *avctx)
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;
}