jfjoch_viewer: Trace more potential memory issues

This commit is contained in:
2025-12-12 17:50:21 +01:00
parent 4e60a37fe1
commit b0891fef50
3 changed files with 18 additions and 0 deletions

View File

@@ -196,6 +196,10 @@ bool JFJochHttpReader::LoadImage_i(std::shared_ptr<JFJochReaderDataset> &dataset
if (!res || res->status != httplib::StatusCode::OK_200)
return false;
if (res->body.empty()) {
return false;
}
try {
buffer.resize(res->body.size());
memcpy(buffer.data(), res->body.data(), res->body.size());