Fixes: NULL pointer dereference Fixes: 68184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-4926478069334016
Unified · Split
| @@ -1218,7 +1218,7 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s, · 1217 unmodified lines | ||
| 1218 | 1218 | return AVERROR_INVALIDDATA; |
| 1219 | 1219 | } |
| 1220 | 1220 | |
| 1221 | − if ((sequence_number == 0 || !s->last_picture.f->data[0]) && | |
| 1221 | + if ((sequence_number == 0 || !s->last_picture.f) && | |
| 1222 | 1222 | dispose_op == APNG_DISPOSE_OP_PREVIOUS) { |
| 1223 | 1223 | // No previous frame to revert to for the first frame |
| 1224 | 1224 | // Spec says to just treat it as a APNG_DISPOSE_OP_BACKGROUND |