diff --git a/src/kernel/libroot/posix/stdlib/env.c b/src/kernel/libroot/posix/stdlib/env.c index 8fd6501496..997e250ef0 100644 --- a/src/kernel/libroot/posix/stdlib/env.c +++ b/src/kernel/libroot/posix/stdlib/env.c @@ -57,8 +57,8 @@ putenv(const char *string) errno = EINVAL; return -1; } - - strlcpy(name, string, value - string); + + strlcpy(name, string, value + 1 - string); value++; return setenv(name, value, true);