From: Wouter Wijngaards Date: Tue, 8 Sep 2009 07:16:36 +0000 (+0000) Subject: * Fix parse error on SOA serial of 2910532839. X-Git-Tag: release-1.6.2~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7091c299581284cedd99f199c2897dfa1611c6d3;p=thirdparty%2Fldns.git * Fix parse error on SOA serial of 2910532839. --- diff --git a/Changelog b/Changelog index b3c47351..eb7430ad 100644 --- 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). diff --git a/str2host.c b/str2host.c index 720868dd..5c94abf1 100644 --- a/str2host.c +++ b/str2host.c @@ -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);