Fix: Signature validation did not close its file. (#12479)
(cherry picked from commit 3316b27496
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
8fdc91bd9f
commit
653e217bb1
@@ -206,6 +206,7 @@ static bool _ValidateSignatureFile(const std::string &filename)
|
|||||||
|
|
||||||
std::string text(filesize, '\0');
|
std::string text(filesize, '\0');
|
||||||
size_t len = fread(text.data(), filesize, 1, f);
|
size_t len = fread(text.data(), filesize, 1, f);
|
||||||
|
FioFCloseFile(f);
|
||||||
if (len != 1) {
|
if (len != 1) {
|
||||||
Debug(misc, 0, "Failed to validate signature: failed to read file: {}", filename);
|
Debug(misc, 0, "Failed to validate signature: failed to read file: {}", filename);
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user