summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-21 15:26:05 +0200
committerNick Mathewson <nickm@torproject.org>2016-07-21 15:26:05 +0200
commit9c210d0e81016b493f1759141ddcbfeda7d5b5f9 (patch)
tree1f92001e67032b4c4d4bcfb324bfcf183753f994
parent1d0775684d3faa0826f7a51f17f6e3442777e313 (diff)
downloadtor-9c210d0e81016b493f1759141ddcbfeda7d5b5f9.tar.gz
tor-9c210d0e81016b493f1759141ddcbfeda7d5b5f9.zip
Avoid infinite stack explosion in windows monotime.
[init calls get calls init calls get calls init.... ]
-rw-r--r--src/common/compat_time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat_time.c b/src/common/compat_time.c
index cc2c3c8a74..77fdfc86cd 100644
--- a/src/common/compat_time.c
+++ b/src/common/compat_time.c
@@ -536,12 +536,12 @@ void
monotime_init(void)
{
if (!monotime_initialized) {
+ monotime_initialized = 1;
monotime_init_internal();
monotime_get(&initialized_at);
#ifdef MONOTIME_COARSE_FN_IS_DIFFERENT
monotime_coarse_get(&initialized_at_coarse);
#endif
- monotime_initialized = 1;
}
}