mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
h264: prevent two matching fields from being both a short/long ref combination
Fixes possible access to freed memory. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
This commit is contained in:
parent
00dbff4c3e
commit
98cc9efc5f
@ -621,6 +621,8 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
|
||||
* Report the problem and keep the pair where it is,
|
||||
* and mark this field valid.
|
||||
*/
|
||||
if (h->short_ref[0] == h->cur_pic_ptr)
|
||||
remove_short_at_index(h, 0);
|
||||
|
||||
if (h->long_ref[mmco[i].long_arg] != h->cur_pic_ptr) {
|
||||
remove_long(h, mmco[i].long_arg, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user