mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/movenc: Avoid integer overflow
Fixes: CID1361947 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
1a82d2cf8f
commit
17d320800b
@ -2454,7 +2454,11 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
|
||||
if (!track_width_1616 ||
|
||||
track->height != track->par->height ||
|
||||
track_width_1616 > UINT32_MAX)
|
||||
track_width_1616 = track->par->width * 0x10000U;
|
||||
track_width_1616 = track->par->width * 0x10000ULL;
|
||||
if (track_width_1616 > UINT32_MAX) {
|
||||
av_log(mov->fc, AV_LOG_WARNING, "track width too large\n");
|
||||
track_width_1616 = 0;
|
||||
}
|
||||
avio_wb32(pb, track_width_1616);
|
||||
avio_wb32(pb, track->height * 0x10000U);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user