aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-22 03:36:36 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-22 03:37:18 +0100
commit8a08503b78f59d61cf98b9deb99363e3e07d8599 (patch)
treee1850a2d8b898ee471188a4652fe56e5869aaf15 /libavcodec
parent184fc600e101bb6190ec92a8a3be8898ff22d225 (diff)
downloadffmpeg-8a08503b78f59d61cf98b9deb99363e3e07d8599.tar.gz
pngdec: Print error if signature is wrong.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pngdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index d4422c181f..39afbdd045 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -407,8 +407,10 @@ static int decode_frame(AVCodecContext *avctx,
/* check signature */
if (memcmp(s->bytestream, ff_pngsig, 8) != 0 &&
- memcmp(s->bytestream, ff_mngsig, 8) != 0)
+ memcmp(s->bytestream, ff_mngsig, 8) != 0) {
+ av_log(avctx, AV_LOG_ERROR, "Missing png signature\n");
return -1;
+ }
s->bytestream+= 8;
s->y=
s->state=0;