Commit 627dd7fe authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/movenc: Fix potential signed overflows

Fixes CID1302838
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 138581c4
......@@ -2374,9 +2374,9 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
if (!track_width_1616 ||
track->height != track->enc->height ||
track_width_1616 > UINT32_MAX)
track_width_1616 = track->enc->width * 0x10000;
track_width_1616 = track->enc->width * 0x10000U;
avio_wb32(pb, track_width_1616);
avio_wb32(pb, track->height * 0x10000);
avio_wb32(pb, track->height * 0x10000U);
}
} else {
avio_wb32(pb, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment