From 323a0318d44665205f8bcc8f0c1e9c5886a37f59 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 13 Jun 2017 16:13:13 +0000 Subject: bugfix: use memmove instead of memcpy in an overlapping stralloc in s6-ftrigrd --- src/libs6/s6-ftrigrd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs6') diff --git a/src/libs6/s6-ftrigrd.c b/src/libs6/s6-ftrigrd.c index 5afec98..8621904 100644 --- a/src/libs6/s6-ftrigrd.c +++ b/src/libs6/s6-ftrigrd.c @@ -105,7 +105,7 @@ static inline int ftrigio_read (ftrigio_t *p) { trig(p->id, '!', p->sa.s[pmatch.rm_eo - 1]) ; if (!(p->options & FTRIGR_REPEAT)) return 0 ; - memcpy(p->sa.s, p->sa.s + pmatch.rm_eo, p->sa.len + 1 - pmatch.rm_eo) ; + memmove(p->sa.s, p->sa.s + pmatch.rm_eo, p->sa.len + 1 - pmatch.rm_eo) ; p->sa.len -= pmatch.rm_eo ; } } -- cgit v1.2.3