diff --git a/src/system/libroot/posix/stdlib/env.cpp b/src/system/libroot/posix/stdlib/env.cpp index bc155f0c55..36cc03b838 100644 --- a/src/system/libroot/posix/stdlib/env.cpp +++ b/src/system/libroot/posix/stdlib/env.cpp @@ -309,7 +309,7 @@ putenv(char *string) char *value = strchr(string, '='); status_t status; - if (value == NULL) { + if (value == NULL || value == string) { __set_errno(B_BAD_VALUE); return -1; }