]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a unit test for the old crash input of tor_timegm().
authorGeorge Kadianakis <desnacked@riseup.net>
Thu, 13 Sep 2012 15:00:06 +0000 (18:00 +0300)
committerGeorge Kadianakis <desnacked@riseup.net>
Thu, 13 Sep 2012 15:00:06 +0000 (18:00 +0300)
src/test/test_util.c

index 7ef4d1f78ca96759f5bf19839e311f5456c055e5..ad49421675ccc842be4e9e4f58c7fe373a7fd233 100644 (file)
@@ -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 */