]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix Terminating Quotes not Written, reported by X41 D-Sec.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 20 Nov 2019 13:01:01 +0000 (14:01 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Wed, 20 Nov 2019 13:01:01 +0000 (14:01 +0100)
dnscrypt/dnscrypt.c
doc/Changelog

index 72a9527f5652a8ed0b82a2a2cfc461d34d028c1d..4a1bd1a10cbacefc9c214f4a01c4b3fe303a10bf 100644 (file)
@@ -751,9 +751,9 @@ dnsc_load_local_data(struct dnsc_env* dnscenv, struct config_file *cfg)
         for(j=0; j<sizeof(struct SignedCert); j++) {
                        int c = (int)*((const uint8_t *) cert + j);
             if (isprint(c) && c != '"' && c != '\\') {
-                snprintf(rr + strlen(rr), rrlen - 1 - strlen(rr), "%c", c);
+                snprintf(rr + strlen(rr), rrlen - strlen(rr), "%c", c);
             } else {
-                snprintf(rr + strlen(rr), rrlen - 1 - strlen(rr), "\\%03d", c);
+                snprintf(rr + strlen(rr), rrlen - strlen(rr), "\\%03d", c);
             }
         }
         verbose(VERB_OPS,
@@ -762,7 +762,7 @@ dnsc_load_local_data(struct dnsc_env* dnscenv, struct config_file *cfg)
                        " to local-data to config: %s",
                        serial, rr
                );
-        snprintf(rr + strlen(rr), rrlen - 1 - strlen(rr), "\"");
+        snprintf(rr + strlen(rr), rrlen - strlen(rr), "\"");
         cfg_strlist_insert(&cfg->local_data, strdup(rr));
         free(rr);
     }
index 9d5db1a54246b3193a6e08ef56777206a0639f7a..5ae98c560fdc2a2b76fc95d39620f3725b2cec5a 100644 (file)
@@ -31,6 +31,7 @@
          ifdef sha2.h inclusion for older systems.
        - Fixed Compat Code Diverging from Upstream, reported by X41 D-Sec.
        - Fix compile with --enable-alloc-checks, reported by X41 D-Sec.
+       - Fix Terminating Quotes not Written, reported by X41 D-Sec.
 
 19 November 2019: Wouter
        - Fix CVE-2019-18934, shell execution in ipsecmod.