summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-03-11 13:03:25 -0500
committerNick Mathewson <nickm@torproject.org>2011-03-11 23:27:53 -0500
commit3a0c6021556abc96f4c610d5e097e3890216595f (patch)
treed17c12c463cf9bee5eb88d00caee8521aa45a4a7 /src
parentf7a3cdc8f27c2306cf06d742af63846c82ebdc56 (diff)
downloadtor-3a0c6021556abc96f4c610d5e097e3890216595f.tar.gz
tor-3a0c6021556abc96f4c610d5e097e3890216595f.zip
Clarify threat description and avoid negative uptimes.
Diffstat (limited to 'src')
-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 69001de839..e4afe62b67 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -537,7 +537,7 @@ rep_hist_get_uptime(const char *id, time_t when)
or_history_t *hist = get_or_history(id);
if (!hist)
return 0;
- if (!hist->start_of_run)
+ if (!hist->start_of_run || when < hist->start_of_run)
return 0;
return when - hist->start_of_run;
}