summaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-02-06 00:54:47 +0000
committerNick Mathewson <nickm@torproject.org>2008-02-06 00:54:47 +0000
commit368f62c79d8bd64db74eed1680527d438c6d050b (patch)
tree50b1a064f603b4dd24e2063073a9edd15bd0c71a /src/or/rephist.c
parent12071df6c88415e60c990f230dcb67635431aafa (diff)
downloadtor-368f62c79d8bd64db74eed1680527d438c6d050b.tar.gz
tor-368f62c79d8bd64db74eed1680527d438c6d050b.zip
r17933@catbus: nickm | 2008-02-05 19:54:28 -0500
Stamp out a bunch of atoi users; make more tor_parse_long() users check their outputs. svn:r13395
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index 2c84e40c2f..8908e03294 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -741,7 +741,7 @@ parse_possibly_bad_iso_time(const char *s, time_t *time_out)
char b[5];
strlcpy(b, s, sizeof(b));
b[4] = '\0';
- year = atoi(b);
+ year = (int)tor_parse_long(b, 10, 0, INT_MAX, NULL, NULL);
if (year < 1970) {
*time_out = 0;
++n_bogus_times;