commit | 7a93b33160dedbce228b3a35851e520f6ecd84aa | [log] [tgz] |
---|---|---|
author | Lee Thomason <lthomaso@adobe.com> | Fri May 22 11:00:32 2015 -0700 |
committer | Lee Thomason <lthomaso@adobe.com> | Fri May 22 11:00:32 2015 -0700 |
tree | 5c107769032d6cabe9a3c1458e7107dff964d964 | |
parent | 2ecc203835c00f0073ac16e913c9fca90dfc520f [diff] [blame] |
tighten up the error checks
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 81296e6..cefd22d 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -1857,7 +1857,7 @@ return _errorID; } - if ( filelength >= (size_t)-1 ) { + if ( (size_t)filelength >= (size_t)-1 ) { // Cannot handle files which won't fit in buffer together with null terminator SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); return _errorID;