From 04f158ce9a12746eb216892b2bf8259749db254e Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Tue, 6 Nov 2001 20:21:42 +0000 Subject: [PATCH] 1107. [bug] nsupdate could catch an assertion failure if an invalid domain name was given as the argument to the "zone" command. --- CHANGES | 4 ++++ bin/nsupdate/nsupdate.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index de5fd2f056..46544b0df1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1107. [bug] nsupdate could catch an assertion failure if an + invalid domain name was given as the argument to + the "zone" command. + 1106. [bug] After seeing an out of range TTL, nsupdate would treat all TTLs as out of range. [RT #2001] diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index 2fae893eee..b260589fea 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.110 2001/11/06 19:59:38 gson Exp $ */ +/* $Id: nsupdate.c,v 1.111 2001/11/06 20:21:42 gson Exp $ */ #include @@ -1089,6 +1089,7 @@ evaluate_zone(char *cmdline) { result = dns_name_fromtext(userzone, &b, dns_rootname, ISC_FALSE, NULL); if (result != ISC_R_SUCCESS) { + userzone = NULL; /* Lest it point to an invalid name */ fprintf(stderr, "could not parse zone name\n"); return (STATUS_SYNTAX); }