diff options
Diffstat (limited to 'main/libuv/unsetenv.patch')
-rw-r--r-- | main/libuv/unsetenv.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/main/libuv/unsetenv.patch b/main/libuv/unsetenv.patch new file mode 100644 index 0000000000..67d9f725ae --- /dev/null +++ b/main/libuv/unsetenv.patch @@ -0,0 +1,28 @@ +From 4cffd5aaa32d364cec6dcbfa7ee54816e8ef6fc9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= <aklitzing@gmail.com> +Date: Fri, 7 Jul 2017 22:41:12 +0200 +Subject: [PATCH] Check for NULL in uv_os_unsetenv for parameter name + +* Fixes segfault of unit test on musl (AlpineLinux) +* Add a check for parameter like uv_os_setenv do +--- + src/unix/core.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/unix/core.c b/src/unix/core.c +index 4c744925..a0513451 100644 +--- a/src/unix/core.c ++++ b/src/unix/core.c +@@ -1292,6 +1292,9 @@ int uv_os_setenv(const char* name, const char* value) { + + + int uv_os_unsetenv(const char* name) { ++ if (name == NULL) ++ return -EINVAL; ++ + if (unsetenv(name) != 0) + return -errno; + +-- +2.13.2 + |