aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-09-25 02:08:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-09-25 02:17:36 +0200
commit65bf9a44d7b0295e03463fd143499ab5b85d0cb7 (patch)
treed5d21d163e78011e849a7fbf914b019da0a7f851
parentbb4b041df351e49a0fa16007fb4505adea0836d8 (diff)
downloadffmpeg-65bf9a44d7b0295e03463fd143499ab5b85d0cb7.tar.gz
avcodec/pngdec: check for stream end in png_decode_idat()
Fix infinite loop Fix Ticket2978 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/pngdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index cee97b321e..18295c550e 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -381,6 +381,8 @@ static int png_decode_idat(PNGDecContext *s, int length)
s->zstream.avail_out = s->crow_size;
s->zstream.next_out = s->crow_buf;
}
+ if (ret == Z_STREAM_END)
+ break;
}
return 0;
}