From: TCY16 Date: Tue, 28 Sep 2021 08:05:47 +0000 (+0200) Subject: change strncpy to memmove at @wcawijngaards' suggestion X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84da2409b33d3d78e47749086c414dc21acea9fe;p=thirdparty%2Funbound.git change strncpy to memmove at @wcawijngaards' suggestion --- diff --git a/util/data/msgreply.c b/util/data/msgreply.c index c8993279a..0947a495c 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -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;