diff --git a/arcanist/linter/LocaleDependenceLinter.php b/arcanist/linter/LocaleDependenceLinter.php --- a/arcanist/linter/LocaleDependenceLinter.php +++ b/arcanist/linter/LocaleDependenceLinter.php @@ -29,7 +29,10 @@ "split", "is_space", ], - "src/torcontrol.cpp" => ["atoi"], + "src/torcontrol.cpp" => [ + "atoi", + "strtol", + ], "src/uint256.cpp" => ["tolower"], "src/util.cpp" => ["atoi", "tolower"], "src/utilmoneystr.cpp" => ["isdigit"], diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -427,7 +427,10 @@ while ((n = fread(buffer, 1, sizeof(buffer), f)) > 0) { // Check for reading errors so we don't return any data if we couldn't // read the entire file (or up to maxsize) - if (ferror(f)) return std::make_pair(false, ""); + if (ferror(f)) { + fclose(f); + return std::make_pair(false, ""); + } retval.append(buffer, buffer + n); if (retval.size() > maxsize) { break;