5 Commits

Author SHA1 Message Date
Jeff McGlynn
8915252407 Add checks for boundary conditions for malformed glTF files
When loading untrusted glTF files, ideally an error should be returned
if the file is malformed instead of an exception/crash.  Add additional
validation for crashes found when running tinygltf under a fuzzer, and
add test cases to confirm:

1. Validate that the primitive indices value is within the
   model->accessors bounds before dereferencing.
2. Validate that the accessors bufferView index if valid.
3. Validate that the buffer's index is valid when parsing images.
4. For glb files, validate that the overall length is within the
   provided input buffer.
2019-04-25 16:51:09 -07:00
Syoyo Fujita
924d86e362 Serialize extension with empty object. Fixes #97
Use pretty printing JSON when serializing for the readability.
2018-10-08 21:18:33 +09:00
Syoyo Fujita
dfc3545d79 Fix unit test.
Update README.
2018-08-22 20:35:04 +09:00
Syoyo Fujita
39abfb5f91 Consider Data URI buffers in binary. Fixes #79. 2018-07-11 02:46:52 +09:00
Syoyo Fujita
17cfbcc976 Fix argument to catch claus was wrong.
Add support to compile TinyGLTF with no C++ exception(TINYGLTF_NOEXCEPTION). Fixes #18.
Add initial unit tests.
2018-01-05 20:14:46 +09:00