]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
change strncpy to memmove at @wcawijngaards' suggestion
authorTCY16 <tom@nlnetlabs.nl>
Tue, 28 Sep 2021 08:05:47 +0000 (10:05 +0200)
committerTCY16 <tom@nlnetlabs.nl>
Tue, 28 Sep 2021 08:05:47 +0000 (10:05 +0200)
util/data/msgreply.c

index c8993279a99ab8f9440e3ce52a4b38bdcfbcc070..0947a495cae74f382baf286c7900667f9067b5a2 100644 (file)
@@ -1007,7 +1007,7 @@ int edns_opt_append_ede(struct edns_data* edns, struct regional* region,
                return 0;
        sldns_write_uint16(opt->opt_data, (uint16_t)code);
        if (txt_len)
-               strncpy(opt->opt_data + 2, txt, txt_len);
+               memmove(opt->opt_data + 2, txt, txt_len);
 
        /* append at end of list */
        prevp = &edns->opt_list;