* don't use memcpy on overlapping operations
[citadel.git] / libcitadel / lib / tools.c
index 14cf43ec969c8ec8aa16210cea2e0c5253150fae..7d933de1195b9e2d308a40f3e3304ed1ce2f972e 100644 (file)
@@ -485,7 +485,7 @@ size_t striplt(char *buf) {
        }
 
        new_len = last_nonspace - first_nonspace + 1;
-       memcpy(buf, first_nonspace, new_len);
+       memmove(buf, first_nonspace, new_len);
        buf[new_len] = 0;
        return new_len;
 }