aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0050-fix-regression-in-getspnam-_r-error-code-for-insuffi.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-07-05 13:04:48 +0300
committerTimo Teräs <timo.teras@iki.fi>2017-07-05 13:06:40 +0300
commit50c197239c89545dd072af45f8e644c92fb706a5 (patch)
tree269117c2bc4f3577f66718accc9d70c66b52bd06 /main/musl/0050-fix-regression-in-getspnam-_r-error-code-for-insuffi.patch
parenta0e0ebc0d01600ae0a82f6a1a788324d1b5e09c5 (diff)
downloadaports-50c197239c89545dd072af45f8e644c92fb706a5.tar.bz2
aports-50c197239c89545dd072af45f8e644c92fb706a5.tar.xz
main/musl: cherry-pick upstream fixes
including regression fix for promoting RTLD_LOCAL to RTLD_GLOBAL
Diffstat (limited to 'main/musl/0050-fix-regression-in-getspnam-_r-error-code-for-insuffi.patch')
-rw-r--r--main/musl/0050-fix-regression-in-getspnam-_r-error-code-for-insuffi.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/musl/0050-fix-regression-in-getspnam-_r-error-code-for-insuffi.patch b/main/musl/0050-fix-regression-in-getspnam-_r-error-code-for-insuffi.patch
new file mode 100644
index 0000000000..cc11a81ce1
--- /dev/null
+++ b/main/musl/0050-fix-regression-in-getspnam-_r-error-code-for-insuffi.patch
@@ -0,0 +1,28 @@
+From 91d34c4533e6bf6eacad7a9f001f28f9e5ebc656 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Wed, 21 Jun 2017 19:06:45 -0400
+Subject: [PATCH 50/50] fix regression in getspnam[_r] error code for
+ insufficient buffer size
+
+commit 2d7d05f031e014068a61d3076c6178513395d2ae wrongly changed ERANGE
+to EINVAL, likely as the result of copy-and-paste error.
+---
+ src/passwd/getspnam_r.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/passwd/getspnam_r.c b/src/passwd/getspnam_r.c
+index e488b67f..541206fa 100644
+--- a/src/passwd/getspnam_r.c
++++ b/src/passwd/getspnam_r.c
+@@ -76,7 +76,7 @@ int getspnam_r(const char *name, struct spwd *sp, char *buf, size_t size, struct
+
+ /* Buffer size must at least be able to hold name, plus some.. */
+ if (size < l+100)
+- return errno = EINVAL;
++ return errno = ERANGE;
+
+ /* Protect against truncation */
+ if (snprintf(path, sizeof path, "/etc/tcb/%s/shadow", name) >= sizeof path)
+--
+2.13.1
+