Browse code

avformat/movenc: Fix potential signed overflows

Fixes CID1302838

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2015/06/02 00:54:58
Showing 1 changed files
... ...
@@ -2374,9 +2374,9 @@ static int mov_write_tkhd_tag(AVIOContext *pb, MOVMuxContext *mov,
2374 2374
             if (!track_width_1616 ||
2375 2375
                 track->height != track->enc->height ||
2376 2376
                 track_width_1616 > UINT32_MAX)
2377
-                track_width_1616 = track->enc->width * 0x10000;
2377
+                track_width_1616 = track->enc->width * 0x10000U;
2378 2378
             avio_wb32(pb, track_width_1616);
2379
-            avio_wb32(pb, track->height * 0x10000);
2379
+            avio_wb32(pb, track->height * 0x10000U);
2380 2380
         }
2381 2381
     } else {
2382 2382
         avio_wb32(pb, 0);