Commit 8169c4552d2c5c2aabeca6c5aac1baab146f6557

Authored by Heeyong Song
1 parent 41b1f378

Fix heap-buffer-overflow

Change-Id: I2deb2c089f8cd81155d53467d31e47fd3051c244
examples/reflection-demo/gltf-scene.cpp
... ... @@ -163,6 +163,8 @@ void glTF::LoadFromFile(const std::string& filename)
163 163 mBuffer = LoadFile(binFile);
164 164 jsonBuffer = LoadFile(jsonFile);
165 165  
  166 + jsonBuffer.push_back('\0'); // It should be null terminated.
  167 +
166 168 // Log errors
167 169 if(mBuffer.empty())
168 170 {
... ...