]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
1192. [bug] The seconds fields in LOC records were restricted
authorBrian Wellington <source@isc.org>
Sun, 27 Jan 2002 20:52:47 +0000 (20:52 +0000)
committerBrian Wellington <source@isc.org>
Sun, 27 Jan 2002 20:52:47 +0000 (20:52 +0000)
to three decimal places.  More decimal places should
be allowed and silently truncated.

CHANGES
lib/dns/rdata/generic/loc_29.c

diff --git a/CHANGES b/CHANGES
index d1e35137237414c60c7b619da132ef4eae2b8829..4e9d8f4117362ca81dd3802f4796904f8ea60521 100644 (file)
--- 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]
 
index 9376b6307a7b293366ff1aa88be5716f6383363d..9f19fd7732cbc7d95f208edf2739b43e72340806 100644 (file)
@@ -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)