mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-01 12:22:09 +00:00
avformat/movenc: Check that track_width_1616 fits within the available 32bit before storing it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
14bc570442
commit
061a592b9c
@ -2371,7 +2371,9 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
|
||||
int64_t track_width_1616 = av_rescale(st->sample_aspect_ratio.num,
|
||||
track->enc->width * 0x10000LL,
|
||||
st->sample_aspect_ratio.den);
|
||||
if (!track_width_1616 || track->height != track->enc->height)
|
||||
if (!track_width_1616 ||
|
||||
track->height != track->enc->height ||
|
||||
track_width_1616 > UINT32_MAX)
|
||||
track_width_1616 = track->enc->width * 0x10000;
|
||||
avio_wb32(pb, track_width_1616);
|
||||
avio_wb32(pb, track->height * 0x10000);
|
||||
|
Loading…
Reference in New Issue
Block a user