From b6d7675298430bfd42e06eb73a52e4693299a0df Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Wed, 20 Jan 2016 17:19:57 -0800 Subject: [PATCH] [v9_9] fix unchecked result 4295. [bug] An unchecked result in dns_message_pseudosectiontotext() could allow incorrect text formatting of EDNS EXPIRE options. [RT #41437] --- CHANGES | 4 ++++ lib/dns/message.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index d749333e92..221c1be809 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 0b7aa693da..f3c4bde019 100644 --- a/lib/dns/message.c +++ b/lib/dns/message.c @@ -3290,7 +3290,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; }