apachisundari / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

Integer overflow/wraparound in \src\mp4track.cpp #167

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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