From 2e4c0a50d4ab4417f21092fc6ccb3b707bf613e0 Mon Sep 17 00:00:00 2001 From: Selmar Date: Thu, 15 Mar 2018 17:32:27 +0100 Subject: [PATCH] removed code from another issue --- tiny_gltf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiny_gltf.h b/tiny_gltf.h index f5867c6..450ea8e 100644 --- a/tiny_gltf.h +++ b/tiny_gltf.h @@ -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.";