memcpy regions may not overlap, use memmove

for example a path: "/../../" made quark abort().
This commit is contained in:
Hiltjo Posthuma 2017-07-05 19:06:04 +02:00 committed by Laslo Hunhold
parent bdff59a5f6
commit fc9f02cee3

View file

@ -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;
}
}