aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/blockchain_blackball.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-14 16:31:24 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-14 16:31:24 +0000
commitb1f05f589e4d879c14d3bf4fd294a355862c505a (patch)
tree187ce420dae76d0490230ba043bfc0fdac96ccb2 /src/blockchain_utilities/blockchain_blackball.cpp
parentMerge pull request #4324 (diff)
downloadmonero-b1f05f589e4d879c14d3bf4fd294a355862c505a.tar.xz
blockchain_blackball: error out on fgets error
Diffstat (limited to '')
-rw-r--r--src/blockchain_utilities/blockchain_blackball.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/blockchain_utilities/blockchain_blackball.cpp b/src/blockchain_utilities/blockchain_blackball.cpp
index d9a179f64..c80dd5862 100644
--- a/src/blockchain_utilities/blockchain_blackball.cpp
+++ b/src/blockchain_utilities/blockchain_blackball.cpp
@@ -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);