Ver Fonte

# fix potential off-by-one error when reading compressed X files.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1008 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg há 14 anos atrás
pai
commit
73a7fdf200
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      code/XFileParser.cpp

+ 1 - 1
code/XFileParser.cpp

@@ -202,7 +202,7 @@ XFileParser::XFileParser( const std::vector<char>& pBuffer)
 			est_out += MSZIP_BLOCK; // one decompressed block is 32786 in size
 			est_out += MSZIP_BLOCK; // one decompressed block is 32786 in size
 
 
 			// this block would continue past the file end, abort
 			// this block would continue past the file end, abort
-			if (P1 > End)
+			if (P1 > End+1)
 				throw DeadlyImportError("X: Unexpected end of file while uncompressing");
 				throw DeadlyImportError("X: Unexpected end of file while uncompressing");
 		}
 		}