[FFmpeg-cvslog] pnm: Fix spurious error message.
Michael Niedermayer
git at videolan.org
Sun May 8 01:31:31 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun May 8 01:24:37 2011 +0200| [0257ac8f12099e0c4d784e0db219584cbb739ce2] | committer: Michael Niedermayer
pnm: Fix spurious error message.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0257ac8f12099e0c4d784e0db219584cbb739ce2
---
libavcodec/pnm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 2cbbdf6..dfc18d6 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));
More information about the ffmpeg-cvslog
mailing list