From: Brian Wellington Date: Sun, 27 Jan 2002 20:52:47 +0000 (+0000) Subject: 1192. [bug] The seconds fields in LOC records were restricted X-Git-Tag: v9.0.1^2~8587 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=0062c1ddfe0b2f0a4e206a5d460d8e7d58e29b80;p=thirdparty%2Fbind9.git 1192. [bug] The seconds fields in LOC records were restricted to three decimal places. More decimal places should be allowed and silently truncated. --- diff --git a/CHANGES b/CHANGES index d1e35137237..4e9d8f41173 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1192. [bug] The seconds fields in LOC records were restricted + to three decimal places. More decimal places should + be allowed and silently truncated. + 1191. [bug] A dynamic update removing the last non-apex name in a secure zone would fail. [RT #2399] diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c index 9376b6307a7..9f19fd7732c 100644 --- a/lib/dns/rdata/generic/loc_29.c +++ b/lib/dns/rdata/generic/loc_29.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: loc_29.c,v 1.33 2002/01/21 01:07:19 marka Exp $ */ +/* $Id: loc_29.c,v 1.34 2002/01/27 20:52:47 bwelling Exp $ */ /* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */ @@ -119,8 +119,10 @@ fromtext_loc(ARGS_FROMTEXT) { } for (; i < 3; i++) s1 *= 10; - if (*e != 0) - RETTOK(DNS_R_SYNTAX); + while (*e != 0) { + if (decvalue(*e++) < 0) + RETTOK(DNS_R_SYNTAX); + } } else s1 *= 1000; if (d1 == 90 && s1 != 0) @@ -189,8 +191,10 @@ fromtext_loc(ARGS_FROMTEXT) { } for (; i < 3; i++) s2 *= 10; - if (*e != 0) - RETTOK(DNS_R_SYNTAX); + while (*e != 0) { + if (decvalue(*e++) < 0) + RETTOK(DNS_R_SYNTAX); + } } else s2 *= 1000; if (d2 == 180 && s2 != 0)