From: Andreas Gustafsson Date: Thu, 7 Sep 2000 22:39:03 +0000 (+0000) Subject: pullup: X-Git-Tag: v9.0.0rc6~20 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=4415c7ee954ed26a522ca990053aeb4280c7b4d2;p=thirdparty%2Fbind9.git pullup: 429. [bug] The space reserved for a TSIG record in a response was 2 bytes too short, leading to message generation failures. --- diff --git a/CHANGES b/CHANGES index d266e989484..0f0c879c693 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ + 429. [bug] The space reserved for a TSIG record in a response + was 2 bytes too short, leading to message + generation failures. + 426. [bug] Attempting to generate an oversized RSA key could cause dnssec-keygen to dump core. diff --git a/lib/dns/message.c b/lib/dns/message.c index 6462897dcf3..b56f72bbc27 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: message.c,v 1.131.2.6 2000/08/07 22:07:09 gson Exp $ */ +/* $Id: message.c,v 1.131.2.7 2000/09/07 22:39:03 gson Exp $ */ /*** *** Imports @@ -587,6 +587,8 @@ spacefortsig(dns_tsigkey_t *key, int otherlen) { * 2 bytes for the type * 2 bytes for the class * 4 bytes for the ttl + * 2 bytes for the rdlength + * n2 bytes for the algorithm name * 6 bytes for the time signed * 2 bytes for the fudge * 2 bytes for the MAC size @@ -596,7 +598,7 @@ spacefortsig(dns_tsigkey_t *key, int otherlen) { * 2 bytes for the other data length * y bytes for the other data (at most) * --------------------------------- - * 30 + n1 + n2 + x + y bytes + * 26 + n1 + n2 + x + y bytes */ dns_name_toregion(&key->name, &r1); @@ -608,7 +610,7 @@ spacefortsig(dns_tsigkey_t *key, int otherlen) { if (result != ISC_R_SUCCESS) x = 0; } - return (24 + r1.length + r2.length + x + otherlen); + return (26 + r1.length + r2.length + x + otherlen); } isc_result_t