From: Andreas Gustafsson Date: Wed, 17 Oct 2001 18:26:01 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.2.0rc8~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ca3f52beea3e678921e8f41f05229129156b792;p=thirdparty%2Fbind9.git pullup: 1056. [bug] Rndc could catch an assertion failure on SIGINT due to an uninitialized variable. [RT #1908] --- diff --git a/CHANGES b/CHANGES index 238f22ad626..eecb130aff4 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ +1056. [bug] Rndc could catch an assertion failure on SIGINT due + to an uninitialized variable. [RT #1908] --- 9.2.0rc7 released --- diff --git a/bin/rndc/rndc.c b/bin/rndc/rndc.c index 8e2882d0eec..d0144e4cde7 100644 --- a/bin/rndc/rndc.c +++ b/bin/rndc/rndc.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rndc.c,v 1.77 2001/08/06 11:40:46 gson Exp $ */ +/* $Id: rndc.c,v 1.77.2.1 2001/10/17 18:26:01 gson Exp $ */ /* * Principal Author: DCL @@ -84,6 +84,7 @@ static int sends, recvs, connects; static char *command; static char *args; static char program[256]; +static isc_socket_t *sock = NULL; static void usage(int status) { @@ -189,7 +190,6 @@ rndc_senddone(isc_task_t *task, isc_event_t *event) { static void rndc_recvdone(isc_task_t *task, isc_event_t *event) { - isc_socket_t *sock = ccmsg.sock; isccc_sexpr_t *response = NULL; isccc_sexpr_t *data; isccc_region_t source; @@ -244,7 +244,6 @@ rndc_recvdone(isc_task_t *task, isc_event_t *event) { static void rndc_connected(isc_task_t *task, isc_event_t *event) { isc_socketevent_t *sevent = (isc_socketevent_t *)event; - isc_socket_t *sock = event->ev_sender; isccc_sexpr_t *request = NULL; isccc_sexpr_t *data; isccc_time_t now; @@ -293,7 +292,6 @@ rndc_connected(isc_task_t *task, isc_event_t *event) { static void rndc_start(isc_task_t *task, isc_event_t *event) { isc_sockaddr_t addr; - isc_socket_t *sock = NULL; isc_result_t result; char socktext[ISC_SOCKADDR_FORMATSIZE]; @@ -597,7 +595,7 @@ main(int argc, char **argv) { isc_app_run(); if (connects > 0 || sends > 0 || recvs > 0) - isc_socket_cancel(ccmsg.sock, task, ISC_SOCKCANCEL_ALL); + isc_socket_cancel(sock, task, ISC_SOCKCANCEL_ALL); isc_task_detach(&task); isc_taskmgr_destroy(&taskmgr);