Fix segfault on invalid PlusROM URL.

This commit is contained in:
Christian Speckner 2021-10-11 17:46:47 +02:00
parent b5f5c5068a
commit 1f94a79b1c
1 changed files with 16 additions and 0 deletions

View File

@ -99,6 +99,22 @@ class PlusROMRequest {
"application/octet-stream"
);
if (!response) {
ostringstream ss;
ss
<< "PlusCart: request to "
<< myDestination.host
<< "/"
<< myDestination.path
<< ": failed --- bad URL";
Logger::error(ss.str());
myState = State::failed;
return;
}
if (response->status != 200) {
ostringstream ss;
ss