From 84eda179589266c14a6cb8a315541ba962d8b095 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 14 Jun 2021 12:10:47 +0100 Subject: [PATCH] Make out-of-memory in computeHash fatal --- simgear/io/sg_file.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/io/sg_file.cxx b/simgear/io/sg_file.cxx index 9f223e34..335b17a6 100644 --- a/simgear/io/sg_file.cxx +++ b/simgear/io/sg_file.cxx @@ -82,7 +82,7 @@ std::string SGFile::computeHash() [](char* p) { free(p); }}; if (!buf) { - SG_LOG(SG_IO, SG_ALERT, "Failed to malloc buffer for SHA1 check"); + throw sg_exception("Malloc of SHA buffer failed"); } size_t readLen;