Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/usr.sbin/dhcp/common Pullup 1.3 [tron]:



details:   https://anonhg.NetBSD.org/src/rev/b7e424b2d155
branches:  netbsd-1-5
changeset: 490171:b7e424b2d155
user:      tv <tv%NetBSD.org@localhost>
date:      Thu Nov 09 22:57:30 2000 +0000

description:
Pullup 1.3 [tron]:
Avoid segmentation fault if "dns_zone_lookup()" is called with an
empty string as name. Problem noted by Simon Burge.

diffstat:

 usr.sbin/dhcp/common/dns.c |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r 075af57252fa -r b7e424b2d155 usr.sbin/dhcp/common/dns.c
--- a/usr.sbin/dhcp/common/dns.c        Thu Nov 09 22:47:34 2000 +0000
+++ b/usr.sbin/dhcp/common/dns.c        Thu Nov 09 22:57:30 2000 +0000
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: dns.c,v 1.1.1.5.2.3 2000/10/30 23:02:59 tv Exp $ Copyright (c) 2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dns.c,v 1.1.1.5.2.4 2000/11/09 22:57:30 tv Exp $ Copyright (c) 2000 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -220,6 +220,9 @@
                return ISC_R_NOTFOUND;
 
        len = strlen (name);
+       if (len == 0)
+               return ISC_R_NOTFOUND;
+
        if (name [len - 1] != '.') {
                tname = dmalloc (len + 2, MDL);
                if (!tname)



Home | Main Index | Thread Index | Old Index