pngdec: check if previous frame exists instead of trusting sequence_number
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Fri, 25 Nov 2016 21:09:51 +0000 (22:09 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sun, 27 Nov 2016 22:46:30 +0000 (23:46 +0100)
commit801b5c18c7beefbb894ad4de20d1b591ddb22198
tree281b61a0110bc40ab9c3aaa5af27685dfebe627f
parent55997d50431c0e1033c98d24a51154b93f82b60e
pngdec: check if previous frame exists instead of trusting sequence_number

This fixes a segmentation fault caused by calling memcpy with NULL as
second argument in handle_p_frame_apng.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/pngdec.c