2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

4231. [contrib] Address unchecked calloc call in dlz_mysqldyn_mod.c.

[RT #40840]
This commit is contained in:
Mark Andrews
2015-09-30 15:38:32 +10:00
parent 0dc485ffb6
commit 09f4e41912
2 changed files with 7 additions and 4 deletions

View File

@@ -1,3 +1,6 @@
4231. [contrib] Address unchecked calloc call in dlz_mysqldyn_mod.c.
[RT #40840]
4230. [contrib] dlz_wildcard_dynamic.c:dlz_create could return a
uninitalised result. [RT #40839]

View File

@@ -377,7 +377,7 @@ build_query(mysql_data_t *state, mysql_instance_t *dbi,
isc_boolean_t localdbi = ISC_FALSE;
mysql_arglist_t arglist;
mysql_arg_t *item;
char *p, *q, *tmp, *querystr;
char *p, *q, *tmp, *querystr = NULL;
char *query = NULL;
size_t len = 0;
const char *arg;
@@ -923,12 +923,12 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[],
UNUSED(dlzname);
state = calloc(1, sizeof(mysql_data_t));
dlz_mutex_init(&state->tx_mutex, NULL);
state->transactions=NULL;
if (state == NULL)
return (ISC_R_NOMEMORY);
dlz_mutex_init(&state->tx_mutex, NULL);
state->transactions = NULL;
/* Fill in the helper functions */
va_start(ap, dbdata);
while ((helper_name = va_arg(ap, const char *)) != NULL)