summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-11-09 19:58:37 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-11-09 19:59:05 +0100
commit623cfc93d9ba5790b9b237ce66123bba9fd6a6c7 (patch)
tree849b33b033a06d1b1957cadd2c4136c86303aa3d /libavcodec/pngdec.c
parent02a325cb6fdc1e33a45191cbfbfe4298affcd021 (diff)
pngdec: check that format matches too not just dimensions
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index fb4a018ac8..c1b8b08215 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -825,6 +825,7 @@ static int decode_frame(AVCodecContext *avctx,
if( !(avpkt->flags & AV_PKT_FLAG_KEY)
&& s->last_picture->width == s->current_picture->width
&& s->last_picture->height== s->current_picture->height
+ && s->last_picture->format== s->current_picture->format
) {
int i, j;
uint8_t *pd = s->current_picture->data[0];