stephenyin / mp4v2

Automatically exported from code.google.com/p/mp4v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integer overflow/wraparound in \src\mp4track.cpp

GoogleCodeExporter opened this issue · comments

In line 1124: if (d <= sampleCount * sampleDelta), there is a change for an 
integer wraparound here. 

d is of type MP4Duration, which is unint64_t. The multiplication is of two 
uint32_t. 

A simple change would be to cast of the operands to MP4Duration which would 
convert both of the operands to MP4Duration before multiplication.

I am using the latest version of mp4v2.

Original issue reported on code.google.com by shankar...@gmail.com on 26 Mar 2014 at 8:33