quark

quark web server
git clone git://git.suckless.org/quark
Log | Files | Refs | LICENSE

commit fc9f02cee3c6cbb82c70fbf7285b73092004973f
parent bdff59a5f645a0b79f0a116d313d13f7ed9603ec
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Wed,  5 Jul 2017 19:06:04 +0200

memcpy regions may not overlap, use memmove

for example a path: "/../../" made quark abort().

Diffstat:
quark.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/quark.c b/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; } }