summaryrefslogtreecommitdiff
path: root/src/libtipidee
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-09-23 00:56:49 +0000
committerLaurent Bercot <ska@appnovation.com>2023-09-23 00:56:49 +0000
commit139b577cbeccd495038da51a8a3ddc8eb3397a4d (patch)
treec1a3e1ab3934cde2e6a2e53841aee7f10071530a /src/libtipidee
parent0c0d345022c2e53cd4a0afbfb2452d1a8bdc5bd2 (diff)
downloadtipidee-139b577cbeccd495038da51a8a3ddc8eb3397a4d.tar.xz
Sometimes, memmove is unavoidable.
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'src/libtipidee')
-rw-r--r--src/libtipidee/tipidee_headers_parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtipidee/tipidee_headers_parse.c b/src/libtipidee/tipidee_headers_parse.c
index eed0727..ca14ca5 100644
--- a/src/libtipidee/tipidee_headers_parse.c
+++ b/src/libtipidee/tipidee_headers_parse.c
@@ -165,7 +165,7 @@ static int tipidee_headers_parse_with (buffer *b, tipidee_headers *hdr, get1_fun
LOLDEBUG(" consecutive headers -> concatenating") ;
hdr->buf[start - 1] = ',' ;
hdr->buf[start] = ' ' ;
- memcpy(hdr->buf + start + 1, hdr->buf + header->right, hdr->len - header->right) ;
+ memmove(hdr->buf + start + 1, hdr->buf + header->right, hdr->len - header->right) ;
}
else
{
@@ -176,7 +176,7 @@ static int tipidee_headers_parse_with (buffer *b, tipidee_headers *hdr, get1_fun
memcpy(tmp, hdr->buf + start, len) ;
hdr->buf[start - 1] = ',' ;
hdr->buf[start] = ' ' ;
- memcpy(hdr->buf + start + 1, hdr->buf + header->right, hdr->len - header->right) ;
+ memmove(hdr->buf + start + 1, hdr->buf + header->right, hdr->len - header->right) ;
memcpy(hdr->buf + start + offset, tmp, len) ;
for (uint32_t i = prev + 1 ; i < hdr->n ; i++)
{