mxfdec: fix potential integer overflow in mxf_compute_sample_count()

Fixes CID743442
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/8/head
Michael Niedermayer 12 years ago
parent 7b723ed4c0
commit caedd51e56
  1. 2
      libavformat/mxfdec.c

@ -2040,7 +2040,7 @@ static int mxf_compute_sample_count(MXFContext *mxf, int stream_index, uint64_t
av_assert2(size);
*sample_count = (mxf->current_edit_unit / size) * total;
*sample_count = (mxf->current_edit_unit / size) * (uint64_t)total;
for (i = 0; i < mxf->current_edit_unit % size; i++) {
*sample_count += spf->samples_per_frame[i];
}

Loading…
Cancel
Save