]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
* Fix parse error on SOA serial of 2910532839.
authorWouter Wijngaards <wouter@NLnetLabs.nl>
Tue, 8 Sep 2009 07:16:36 +0000 (07:16 +0000)
committerWouter Wijngaards <wouter@NLnetLabs.nl>
Tue, 8 Sep 2009 07:16:36 +0000 (07:16 +0000)
Changelog
str2host.c

index b3c473511ddfb3e3ff2ac3879e5c6f5dc96bdf9a..eb7430ad05ebebb32ceab5aba24adee34d33433b 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,5 +1,6 @@
 1.x.x
        * Fix Makefile patch from Havard Eidnes, better install.sh usage.
+       * Fix parse error on SOA serial of 2910532839.
 
 1.6.1   2009-09-14
        * --enable-gost : use the GOST algorithm (experimental).
index 720868dd7d15bef04b7040db5d674008b06bcd1e..5c94abf1035b69e7f00862fbf3f63eb2c2214a08 100644 (file)
@@ -191,7 +191,9 @@ ldns_str2rdf_int32(ldns_rdf **rd, const char *longstr)
        r = (uint16_t*)LDNS_MALLOC(uint32_t);
        errno = 0; /* must set to zero before call, 
                        note race condition on errno */
-       l = htonl((uint32_t)strtol((char*)longstr, &end, 10));
+       if(*longstr == '-')
+               l = htonl((uint32_t)strtol((char*)longstr, &end, 10));
+       else    l = htonl((uint32_t)strtoul((char*)longstr, &end, 10));
 
        if(*end != 0) {
                LDNS_FREE(r);