memcpy regions may not overlap, use memmove
for example a path: "/../../" made quark abort().
This commit is contained in:
parent
bdff59a5f6
commit
fc9f02cee3
1 changed files with 1 additions and 1 deletions
2
quark.c
2
quark.c
|
@ -531,7 +531,7 @@ squash:
|
|||
*p = '\0';
|
||||
len = p - path;
|
||||
} else {
|
||||
memcpy(p, q + 1, len - ((q + 1) - path) + 2);
|
||||
memmove(p, q + 1, len - ((q + 1) - path) + 2);
|
||||
len -= (q + 1) - p;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue