diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2017-06-13 16:13:13 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2017-06-13 16:13:13 +0000 |
commit | 323a0318d44665205f8bcc8f0c1e9c5886a37f59 (patch) | |
tree | dbcf8e9b78933bfbe0cc33f4a67c08115e1748d3 /src/libs6 | |
parent | 0f40a3bd1d0611ec990f1547f9f0e3f42212c587 (diff) | |
download | s6-323a0318d44665205f8bcc8f0c1e9c5886a37f59.tar.xz |
bugfix: use memmove instead of memcpy in an overlapping stralloc in s6-ftrigrd
Diffstat (limited to 'src/libs6')
-rw-r--r-- | src/libs6/s6-ftrigrd.c | 2 |
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 ; } } |