[BZ #524]
authorUlrich Drepper <drepper@redhat.com>
Mon, 26 Sep 2005 16:12:12 +0000 (16:12 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 26 Sep 2005 16:12:12 +0000 (16:12 +0000)
* sysdeps/posix/getaddrinfo.c (match_prefix): Fix matching loop of
number of bits is multiple of 8.
Patch by Fredrik Tolf <fredrik@dolda2000.com>.

ChangeLog
sysdeps/posix/getaddrinfo.c

index 58dfee8..e5b24f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-09-26  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #524]
+       * sysdeps/posix/getaddrinfo.c (match_prefix): Fix matching loop of
+       number of bits is multiple of 8.
+       Patch by Fredrik Tolf <fredrik@dolda2000.com>.
+
        [BZ #516]
        * elf/dl-load.c: Report failed loading due to ELF class mismatch
        with better words.
index d97b95b..4db98d9 100644 (file)
@@ -1266,7 +1266,7 @@ match_prefix (const struct sockaddr_storage *ss, const struct prefixlist *list,
       uint8_t *mask = list[idx].prefix.s6_addr;
       uint8_t *val = in6->sin6_addr.s6_addr;
 
-      while (bits > 8)
+      while (bits >= 8)
        {
          if (*mask != *val)
            break;