mirror of
https://github.com/syoyo/tinygltf.git
synced 2026-06-22 23:28:49 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5e653e46c | ||
|
|
d530cd410b |
@@ -6453,6 +6453,15 @@ bool TinyGLTF::LoadFromString(Model *model, std::string *err, std::string *warn,
|
||||
return false;
|
||||
}
|
||||
const Buffer &buffer = model->buffers[size_t(bufferView.buffer)];
|
||||
if (bufferView.byteOffset >= buffer.data.size()) {
|
||||
if (err) {
|
||||
std::stringstream ss;
|
||||
ss << "image[" << idx << "] bufferView \"" << image.bufferView
|
||||
<< "\" indexed out of bounds of its buffer." << std::endl;
|
||||
(*err) += ss.str();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (LoadImageData == nullptr) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user