diff options
author | Stef Walter <stefw@gnome.org> | 2013-04-04 08:04:51 +0200 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-04-04 08:04:51 +0200 |
commit | 32b0b448d0ac4f1fa5f9143f0c4385066a9b4a76 (patch) | |
tree | 0469011a6cd5cedeff15fcbea02eec709bebde0f /trust | |
parent | d6e0982658acb231333ebfbfb7efff8b762231d0 (diff) |
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.
Diffstat (limited to 'trust')
-rw-r--r-- | trust/builder.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |