aboutsummaryrefslogtreecommitdiff
path: root/src/or/geoip.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-02-27 15:42:57 +0100
committerAlexander Færøy <ahf@torproject.org>2017-03-01 21:26:27 +0100
commit3dca5a6e71929f88c9c76f6ebbaac58789884b6e (patch)
tree98494b44b88ba4eecbe3a919fb9d288da4c17de1 /src/or/geoip.c
parent498287b3c340739bede9a3fa95ea23b6ae650bf3 (diff)
downloadtor-3dca5a6e71929f88c9c76f6ebbaac58789884b6e.tar.gz
tor-3dca5a6e71929f88c9c76f6ebbaac58789884b6e.zip
Use tor_fgets() instead of fgets().
This patch changes our use of fgets() to tor_fgets() for more consistent error handling across different versions of the C library.
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r--src/or/geoip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index 74811ea643..a8dc807c19 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -346,7 +346,7 @@ geoip_load_file(sa_family_t family, const char *filename)
(family == AF_INET) ? "IPv4" : "IPv6", filename);
while (!feof(f)) {
char buf[512];
- if (fgets(buf, (int)sizeof(buf), f) == NULL)
+ if (tor_fgets(buf, (int)sizeof(buf), f) == NULL)
break;
crypto_digest_add_bytes(geoip_digest_env, buf, strlen(buf));
/* FFFF track full country name. */