]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Thu, 14 Jun 2001 22:03:38 +0000 (22:03 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 14 Jun 2001 22:03:38 +0000 (22:03 +0000)
903.    [bug]           dig should not crash when receiving a tcp packet
                        of length 0.

CHANGES
bin/dig/dighost.c

diff --git a/CHANGES b/CHANGES
index 3d07c02374b6e4d1a46942dc8bfd9ccfe0ea8eff..fe228a473bfc590240da4bceab86ab8eef60c534 100644 (file)
--- 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.
 
index e4e30583bf2861040e11a3ec6b02030cc706656c..f72cb5f787269dfa184167906d12b069d0a39917 100644 (file)
@@ -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.