From 84da2409b33d3d78e47749086c414dc21acea9fe Mon Sep 17 00:00:00 2001 From: TCY16 Date: Tue, 28 Sep 2021 10:05:47 +0200 Subject: [PATCH] change strncpy to memmove at @wcawijngaards' suggestion --- util/data/msgreply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.2