Commit 7296716e authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/h264: Clear last_pic_for_ec on seeks and reinits

Fixes out of array read
Fixes: asan_heap-oob_2ff30d2_3479_cov_3803648058_src13_hrc7_525_420_2.264

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 390c5778
......@@ -1084,6 +1084,8 @@ void ff_h264_flush_change(H264Context *h)
h->delayed_pic[j++] = h->delayed_pic[i];
h->delayed_pic[j] = NULL;
}
ff_h264_unref_picture(h, &h->last_pic_for_ec);
h->first_field = 0;
ff_h264_reset_sei(h);
h->recovery_frame = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment