czchmate / mp4v2

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

Off-by-one error on MP4File::ReadCountedString() in mp4file_io.cpp #142

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When fixedLength is set and length byte is too big,
this function tries not to read beyond the fixedLength.
However, it actually reads fixedLength + 1.

Since first byte is already taken as length byte, the following check:
  if (fixedLength && (charLength > fixedLength)) {
should be:
  if (fixedLength && (charLength > fixedLength - 1)) {

Original issue reported on code.google.com by honeycom...@gmail.com on 11 Oct 2012 at 8:40

GoogleCodeExporter commented 8 years ago
Uploaded a sample movie (which triggers issue 142 problem):
http://www.mediafire.com/?cecw98iwt2j5347

ffmpeg, mp4box, L-SMASH deal this movie with no trouble.

Original comment by honeycom...@gmail.com on 11 Oct 2012 at 3:47

GoogleCodeExporter commented 8 years ago

Original comment by kid...@gmail.com on 29 Oct 2012 at 1:12

GoogleCodeExporter commented 8 years ago
Tried the fix with your file, that seems to work.  Thanks.  Should be fixed in 
r500

Original comment by kid...@gmail.com on 18 Nov 2012 at 6:28