summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-06-13 16:13:13 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-06-13 16:13:13 +0000
commit323a0318d44665205f8bcc8f0c1e9c5886a37f59 (patch)
treedbcf8e9b78933bfbe0cc33f4a67c08115e1748d3 /src
parent0f40a3bd1d0611ec990f1547f9f0e3f42212c587 (diff)
downloads6-323a0318d44665205f8bcc8f0c1e9c5886a37f59.tar.xz
bugfix: use memmove instead of memcpy in an overlapping stralloc in s6-ftrigrd
Diffstat (limited to 'src')
-rw-r--r--src/libs6/s6-ftrigrd.c2
1 files changed, 1 insertions, 1 deletions
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 ;
}
}