]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[master] fix unchecked result
authorEvan Hunt <each@isc.org>
Thu, 21 Jan 2016 01:19:19 +0000 (17:19 -0800)
committerEvan Hunt <each@isc.org>
Thu, 21 Jan 2016 01:19:19 +0000 (17:19 -0800)
4295. [bug] An unchecked result in dns_message_pseudosectiontotext()
could allow incorrect text formatting of EDNS EXPIRE
options. [RT #41437]

CHANGES
lib/dns/message.c

diff --git a/CHANGES b/CHANGES
index 806a118684c713c265632d1ccbbe6915a02fcc3e..7a91b5a2af95535b5039f70e5ef15e37f6d55d4d 100644 (file)
--- 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]
 
index 95a33d8206b947d847f499de0667106e4f5a2913..e2d15e931bf0c9874709ea33fca1c61f7918469e 100644 (file)
@@ -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;
                                }