From: Evan Hunt Date: Thu, 21 Jan 2016 01:19:19 +0000 (-0800) Subject: [master] fix unchecked result X-Git-Tag: v9.11.0a1~186 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2879ee2c72638ea190728f931ce286760caa4521;p=thirdparty%2Fbind9.git [master] fix unchecked result 4295. [bug] An unchecked result in dns_message_pseudosectiontotext() could allow incorrect text formatting of EDNS EXPIRE options. [RT #41437] --- diff --git a/CHANGES b/CHANGES index 806a118684c..7a91b5a2af9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +4295. [bug] An unchecked result in dns_message_pseudosectiontotext() + could allow incorrect text formatting of EDNS EXPIRE + options. [RT #41437] + 4294. [bug] Fixed a regression in which "rndc stop -p" failed to print the PID. [RT #41513] diff --git a/lib/dns/message.c b/lib/dns/message.c index 95a33d8206b..e2d15e931bf 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -3388,7 +3388,11 @@ dns_message_pseudosectiontotext(dns_message_t *msg, snprintf(buf, sizeof(buf), "%u", secs); ADD_STRING(target, buf); ADD_STRING(target, " ("); - dns_ttl_totext(secs, ISC_TRUE, target); + result = dns_ttl_totext(secs, + ISC_TRUE, + target); + if (result != ISC_R_SUCCESS) + return (result); ADD_STRING(target, ")\n"); continue; }