jfjoch_viewer: Trace more potential memory issues
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user