removed code from another issue

This commit is contained in:
Selmar
2018-03-15 17:32:27 +01:00
committed by GitHub
parent f17ab2c39e
commit 2e4c0a50d4

View File

@@ -3207,7 +3207,7 @@ bool TinyGLTF::LoadBinaryFromMemory(Model *model, std::string *err,
memcpy(&model_format, bytes + 16, 4);
swap4(&model_format);
if ((20 + model_length > size) || (model_length < 1) || // specification allows a GLB file with no bin buffer
if ((20 + model_length >= size) || (model_length < 1) ||
(model_format != 0x4E4F534A)) { // 0x4E4F534A = JSON format.
if (err) {
(*err) = "Invalid glTF binary.";