commit 323a0318d44665205f8bcc8f0c1e9c5886a37f59
parent 0f40a3bd1d0611ec990f1547f9f0e3f42212c587
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date: Tue, 13 Jun 2017 16:13:13 +0000
bugfix: use memmove instead of memcpy in an overlapping stralloc in s6-ftrigrd
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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 ;
}
}