diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-03-24 12:26:46 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-03-24 12:26:46 -0400 |
commit | 4f86d75a4bece7768ddb87db0276268666efcf11 (patch) | |
tree | b35e775d5bae184ad3311e9e01875d52d757e023 /src | |
parent | e50b0b753202d2fb2f6e543a29fd6d51cf491d8d (diff) | |
download | tor-4f86d75a4bece7768ddb87db0276268666efcf11.tar.gz tor-4f86d75a4bece7768ddb87db0276268666efcf11.zip |
try to fix a test failure for sizeof(time_t)==4.
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test_util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 62c676540f..bcbffe1b49 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -581,10 +581,10 @@ test_util_time(void *arg) * time_t */ format_rfc1123_time(timestr, (time_t)2150000000UL); #if SIZEOF_TIME_T == 4 - /* format_rfc1123_time should indicate failure on overflow, but it doesn't - * yet. Hopefully #18480 will improve the failure semantics in this case. - tt_str_op("Wed, 17 Feb 2038 06:13:20 GMT",OP_EQ, timestr); - */ + /* Wrapping around will have made it this. */ + tt_str_op("Sat, 11 Jan 1902 23:45:04 GMT",OP_EQ, timestr); + /* Make sure that the right date doesn't parse. */ + strlcpy(timestr, "Wed, 17 Feb 2038 06:13:20 GMT", sizeof(timestr)); t_res = 0; i = parse_rfc1123_time(timestr, &t_res); |