summaryrefslogtreecommitdiff
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-08 01:24:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-08 01:33:40 +0200
commit0257ac8f12099e0c4d784e0db219584cbb739ce2 (patch)
treecc46398e498faece42f170e0a8317247b81c1c08 /libavcodec/pnm.c
parent7030501383ec630207f9a14c1448bcfc265499f9 (diff)
downloadffmpeg-0257ac8f12099e0c4d784e0db219584cbb739ce2.tar.gz
pnm: Fix spurious error message.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 2cbbdf60ea..dfc18d6013 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -135,7 +135,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
return -1;
pnm_get(s, buf1, sizeof(buf1));
avctx->height = atoi(buf1);
- if(av_image_check_size(avctx->width, avctx->height, 0, avctx))
+ if(avctx->height <= 0 || av_image_check_size(avctx->width, avctx->height, 0, avctx))
return -1;
if (avctx->pix_fmt != PIX_FMT_MONOWHITE) {
pnm_get(s, buf1, sizeof(buf1));