diff options
| -rw-r--r-- | common/quicktime.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/common/quicktime.cpp b/common/quicktime.cpp index 5176f83a35..173d3c6a97 100644 --- a/common/quicktime.cpp +++ b/common/quicktime.cpp @@ -217,7 +217,11 @@ int QuickTimeParser::readDefault(Atom atom) {  		a.size -= 8; -		if (_parseTable[i].type == 0) { // skip leaf atoms data +		if (a.size + (uint32)_fd->pos() > (uint32)_fd->size()) { +			_fd->seek(_fd->size()); +			debug(0, "Skipping junk found at the end of the QuickTime file"); +			return 0; +		} else if (_parseTable[i].type == 0) { // skip leaf atom data  			debug(0, ">>> Skipped [%s]", tag2str(a.type));  			_fd->seek(a.size, SEEK_CUR);  | 
