]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4230. [contrib] dlz_wildcard_dynamic.c:dlz_create could return a
authorMark Andrews <marka@isc.org>
Wed, 30 Sep 2015 05:33:16 +0000 (15:33 +1000)
committerMark Andrews <marka@isc.org>
Wed, 30 Sep 2015 05:33:16 +0000 (15:33 +1000)
                        uninitalised result. [RT #40839]

CHANGES
contrib/dlz/modules/wildcard/dlz_wildcard_dynamic.c

diff --git a/CHANGES b/CHANGES
index 35b32936fed581c3d076f2749b6eb6a8f5dd0d59..a71edfb06a6fa3492396d3160c41bf5658dcf545 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4230.  [contrib]       dlz_wildcard_dynamic.c:dlz_create could return a
+                       uninitalised result. [RT #40839]
+
 4229.  [bug]           A variable could be used uninitalised in
                        dns_update_signaturesinc. [RT #40784]
 
index 8225d1ac80536ef5eb249b8a13e01f524dfc82f2..875d4ff12ace3a3dc06e5866cc39ed2794a00b37 100644 (file)
@@ -434,12 +434,11 @@ dlz_create(const char *dlzname, unsigned int argc, char *argv[],
        DLZ_LIST_INIT(cd->rrs_list);
 
        cd->zone_pattern = strdup(argv[1]);
-       if (cd->zone_pattern == NULL)
-               goto cleanup;
-
        cd->axfr_pattern = strdup(argv[2]);
-       if (cd->axfr_pattern == NULL)
+       if (cd->zone_pattern == NULL || cd->axfr_pattern == NULL) {
+               result = ISC_R_NOMEMORY;
                goto cleanup;
+       }
 
        def_ttl = strtol(argv[3], &endp, 10);
        if (*endp != '\0' || def_ttl < 0) {