]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
pullup:
authorAndreas Gustafsson <source@isc.org>
Thu, 19 Apr 2001 18:54:26 +0000 (18:54 +0000)
committerAndreas Gustafsson <source@isc.org>
Thu, 19 Apr 2001 18:54:26 +0000 (18:54 +0000)
Return ISC_R_NOSPACE if the buffer isn't large enough to hold the DNS header.

lib/dns/message.c

index 7ac444e6b6205ebea91ed10595d64ed526ecb5e0..3e5e98475dbb55fa7e9f50a4061dbf4de39b3cb0 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: message.c,v 1.164.2.4 2001/03/20 18:46:35 gson Exp $ */
+/* $Id: message.c,v 1.164.2.5 2001/04/19 18:54:26 gson Exp $ */
 
 /***
  *** Imports
@@ -1577,7 +1577,8 @@ dns_message_renderbegin(dns_message_t *msg, isc_buffer_t *buffer) {
         * buffer.
         */
        isc_buffer_availableregion(buffer, &r);
-       REQUIRE(r.length >= DNS_MESSAGE_HEADERLEN);
+       if (r.length < DNS_MESSAGE_HEADERLEN)
+               return (ISC_R_NOSPACE);
 
        if (r.length < msg->reserved)
                return (ISC_R_NOSPACE);