From 32b0b448d0ac4f1fa5f9143f0c4385066a9b4a76 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 4 Apr 2013 08:04:51 +0200 Subject: Fix off by one in date parsing code We didn't treat the two digit year 00 as a valid year, whereas it actually represents the year 2000. This is in a non-critical code path. --- trust/builder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trust') diff --git a/trust/builder.c b/trust/builder.c index 15999bb..698fef1 100644 --- a/trust/builder.c +++ b/trust/builder.c @@ -332,7 +332,7 @@ calc_date (node_asn *node, return_val_if_fail (len >= 6, false); year = atoin (buf, 2); - return_val_if_fail (year > 0, false); + return_val_if_fail (year >= 0, false); century = century_for_two_digit_year (year); return_val_if_fail (century >= 0, false); -- cgit v1.1