]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3586. [buf] Handle errors in xmlDocDumpFormatMemoryEnc. [RT #33706]
authorMark Andrews <marka@isc.org>
Thu, 6 Jun 2013 00:55:08 +0000 (10:55 +1000)
committerMark Andrews <marka@isc.org>
Thu, 6 Jun 2013 01:01:51 +0000 (11:01 +1000)
(cherry picked from commit 7ee225cf90fd06de61682b442600af88b68b99db)

CHANGES
bin/named/statschannel.c

diff --git a/CHANGES b/CHANGES
index a4d8b80c0e234a523b74fbe8188738c3a89957cb..b4351f3b84e433389d9991cd9a3fd462906a7213 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+3586.  [buf]           Handle errors in xmlDocDumpFormatMemoryEnc. [RT #33706]
+
 3584.  [security]      Caching data from an incompletely signed zone could
                        trigger an assertion failure in resolver.c [RT #33690]
 
index b6732fa55066eed31165b97fea98835895129521..c62294317412424c0eb60d989572e4560ac8b329 100644 (file)
@@ -955,6 +955,8 @@ generatexml(ns_server_t *server, int *buflen, xmlChar **buf) {
        xmlFreeTextWriter(writer);
 
        xmlDocDumpFormatMemoryEnc(doc, buf, buflen, "UTF-8", 1);
+       if (*buf == NULL)
+               goto error;
        xmlFreeDoc(doc);
        return (ISC_R_SUCCESS);
 
@@ -979,7 +981,7 @@ render_index(const char *url, const char *querystring, void *arg,
             isc_buffer_t *b, isc_httpdfree_t **freecb,
             void **freecb_args)
 {
-       unsigned char *msg;
+       unsigned char *msg = NULL;
        int msglen;
        ns_server_t *server = arg;
        isc_result_t result;