From: George Kadianakis Date: Thu, 13 Sep 2012 15:00:06 +0000 (+0300) Subject: Add a unit test for the old crash input of tor_timegm(). X-Git-Tag: tor-0.2.4.6-alpha~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7072dd5dbe28b9eedfeb9ca743f6db8b7ed08a57;p=thirdparty%2Ftor.git Add a unit test for the old crash input of tor_timegm(). --- diff --git a/src/test/test_util.c b/src/test/test_util.c index 7ef4d1f78c..ad49421675 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -152,6 +152,7 @@ test_util_time(void) test_eq(-1, parse_iso_time("2011-03-30 23:59:62 GMT", &t_res)); test_eq(-1, parse_iso_time("1969-03-30 23:59:59 GMT", &t_res)); test_eq(-1, parse_iso_time("2011-00-30 23:59:59 GMT", &t_res)); + test_eq(-1, parse_iso_time("2147483647-08-29 14:00:00", &t_res)); test_eq(-1, parse_iso_time("2011-03-30 23:59", &t_res)); /* Test tor_gettimeofday */