]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Correctly detect when get_direction failed
authorMark Andrews <marka@isc.org>
Thu, 18 Feb 2021 05:57:28 +0000 (16:57 +1100)
committerMark Andrews <marka@isc.org>
Fri, 19 Feb 2021 00:40:05 +0000 (11:40 +1100)
(cherry picked from commit 009358d77d68ea6ad90702a951483beb11717c00)

lib/dns/rdata/generic/loc_29.c

index 068c1d287ff24c7b35bfd9566d4c316e7f43f890..8aa1ac40498b0e912834289aa8bcec09ee46e563 100644 (file)
@@ -242,7 +242,7 @@ loc_getcoordinate(isc_lex_t *lexer, unsigned long *dp, unsigned long *mp,
         * Direction.
         */
        RETERR(get_direction(lexer, &token, directions, &direction));
-       if (direction == -1) {
+       if (direction == 0) {
                RETERR(DNS_R_SYNTAX);
        }
 done: