mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 08:17:37 +00:00
blockchain_blackball: error out on fgets error
This commit is contained in:
parent
d743994086
commit
b1f05f589e
1 changed files with 5 additions and 1 deletions
|
@ -898,7 +898,11 @@ static std::vector<std::pair<uint64_t, uint64_t>> load_outputs(const std::string
|
|||
while (1)
|
||||
{
|
||||
char s[256];
|
||||
fgets(s, sizeof(s), f);
|
||||
if (!fgets(s, sizeof(s), f))
|
||||
{
|
||||
MERROR("Error reading from " << filename << ": " << strerror(errno));
|
||||
break;
|
||||
}
|
||||
if (feof(f))
|
||||
break;
|
||||
const size_t len = strlen(s);
|
||||
|
|
Loading…
Reference in a new issue