From: Andreas Gustafsson Date: Thu, 14 Jun 2001 22:03:38 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.1.3rc2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cbdb30f5adaf13ba2ec8fa595ed22ad86ca46223;p=thirdparty%2Fbind9.git pullup: 903. [bug] dig should not crash when receiving a tcp packet of length 0. --- diff --git a/CHANGES b/CHANGES index 3d07c02374b..fe228a473bf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,7 @@ + 903. [bug] dig should not crash when receiving a TCP packet + of length 0. + 901. [cleanup] The man pages no longer have empty lines outside of literal blocks. diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index e4e30583bf2..f72cb5f7872 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dighost.c,v 1.174.2.9 2001/06/11 18:25:41 bwelling Exp $ */ +/* $Id: dighost.c,v 1.174.2.10 2001/06/14 22:03:38 gson Exp $ */ /* * Notice to programmers: Do not use this code as an example of how to @@ -1934,11 +1934,13 @@ tcp_length_done(isc_task_t *task, isc_event_t *event) { b = ISC_LIST_HEAD(sevent->bufferlist); ISC_LIST_DEQUEUE(sevent->bufferlist, &query->lengthbuf, link); length = isc_buffer_getuint16(b); - if (length > COMMSIZE) { + if (length == 0) { isc_event_free(&event); - fatal("Length of %X was longer than I can handle!", - length); + launch_next_query(query, ISC_FALSE); + UNLOCK_LOOKUP; + return; } + /* * Even though the buffer was already init'ed, we need * to redo it now, to force the length we want.