Commit 5e3f390f authored by Mark Andrews's avatar Mark Andrews
Browse files

2426. [bug] libbind: inet_net_pton() can sometimes return the

                        wrong value if excessively large netmasks are
                        supplied. [RT #18512]
parent ebacb790
2426. [bug] libbind: inet_net_pton() can sometimes return the
wrong value if excessively large netmasks are
supplied. [RT #18512]
2425. [bug] named didn't detect unavailable query source addresses
at load time. [RT #18536]
......
......@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: inet_net_pton.c,v 1.8 2005/04/27 04:56:20 sra Exp $";
static const char rcsid[] = "$Id: inet_net_pton.c,v 1.9 2008/08/26 03:53:04 marka Exp $";
#endif
#include "port_before.h"
......@@ -133,11 +133,11 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
INSIST(n >= 0 && n <= 9);
bits *= 10;
bits += n;
if (bits > 32)
goto enoent;
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
if (ch != '\0')
goto enoent;
if (bits > 32)
goto emsgsize;
}
/* Firey death and destruction unless we prefetched EOS. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment