diff --git a/CHANGES b/CHANGES index 00ad6785ae..ed547f2872 100644 --- 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] diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index 8d30b452f2..e4f56e210f 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -958,6 +958,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); @@ -982,7 +984,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;