[Opendnssec-user] Opendnssec signer Y2K bug?

Miek Gieben miek at miek.nl
Fri Dec 23 12:46:19 UTC 2011


[ Quoting <miek at miek.nl> at 13:38 on Dec 23 in "Re: [Opendnssec-user..." ]
> There is a bug here. I'm digging further.

Not completely sure, but this looks like a valid patch:

--- util.c.patch        2011-12-23 13:44:21.000000000 +0100
+++ util.c      2011-12-23 13:44:38.000000000 +0100
@@ -255,7 +255,7 @@
        int year = 1970;
        int new_year;
 
-       while (days < 0 || days >= (int64_t) (is_leap_year(year) ? 366 : 365)) {
+       while (days < 0 || days > (int64_t) (is_leap_year(year) ? 366 : 365)) {
                new_year = year + (int) LDNS_DIV(days, 366);
                if (year == new_year) {
                        year += days < 0 ? -1 : 1;

grtz Miek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.opendnssec.org/pipermail/opendnssec-user/attachments/20111223/0b5b1c0a/attachment.bin>


More information about the Opendnssec-user mailing list