Browse Source

avcodec/h264_refs: Fix long_idx check

Fixes out of array read
Fixes mozilla bug 1233606

Found-by: Tyson Smith
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.0
Michael Niedermayer 10 years ago
parent
commit
b92b4775a0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/h264_refs.c

+ 1
- 1
libavcodec/h264_refs.c View File

@@ -301,7 +301,7 @@ int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl)


long_idx = pic_num_extract(h, pic_id, &pic_structure); long_idx = pic_num_extract(h, pic_id, &pic_structure);


if (long_idx > 31) {
if (long_idx > 31U) {
av_log(h->avctx, AV_LOG_ERROR, av_log(h->avctx, AV_LOG_ERROR,
"long_term_pic_idx overflow\n"); "long_term_pic_idx overflow\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;


Loading…
Cancel
Save