aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-02-22 06:22:47 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-02-22 06:22:47 +0000
commitd87e4ffb69c7ebea24a593258423391b3e577b13 (patch)
tree83456173c17493390ad70c390a7efa160ac3cd1c
parentbed2ee570d7e736912b5769aa4964410f195cdcb (diff)
downloadalpine_aports-d87e4ffb69c7ebea24a593258423391b3e577b13.tar.bz2
alpine_aports-d87e4ffb69c7ebea24a593258423391b3e577b13.tar.xz
alpine_aports-d87e4ffb69c7ebea24a593258423391b3e577b13.zip
main/musl: upgrade to 1.1.14
-rw-r--r--main/musl/0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch34
-rw-r--r--main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch37
-rw-r--r--main/musl/0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch46
-rw-r--r--main/musl/APKBUILD22
4 files changed, 5 insertions, 134 deletions
diff --git a/main/musl/0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch b/main/musl/0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch
deleted file mode 100644
index 0be9162aab..0000000000
--- a/main/musl/0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 10a17dfbad2c267d885817abc9c7589fc7ff630b Mon Sep 17 00:00:00 2001
2From: Rich Felker <dalias@aerifal.cx>
3Date: Tue, 16 Feb 2016 13:26:16 -0500
4Subject: [PATCH] fix assumption in fputs that fwrite returning 0 implies an
5 error
6
7internally, the idiom of passing nmemb=1 to fwrite and interpreting
8the return value of fwrite (which is necessarily 0 or 1) as
9failure/success is fairly widely used. this is not correct, however,
10when the size argument is unknown and may be zero, since C requires
11fwrite to return 0 in that special case. previously fwrite always
12returned nmemb on success, but this was changed for conformance with
13ISO C by commit 500c6886c654fd45e4926990fee2c61d816be197.
14---
15 src/stdio/fputs.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
17
18diff --git a/src/stdio/fputs.c b/src/stdio/fputs.c
19index 4737f44..1cf344f 100644
20--- a/src/stdio/fputs.c
21+++ b/src/stdio/fputs.c
22@@ -3,7 +3,8 @@
23
24 int fputs(const char *restrict s, FILE *restrict f)
25 {
26- return (int)fwrite(s, strlen(s), 1, f) - 1;
27+ size_t l = strlen(s);
28+ return (fwrite(s, 1, l, f)==l) - 1;
29 }
30
31 weak_alias(fputs, fputs_unlocked);
32--
332.7.1
34
diff --git a/main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch b/main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
deleted file mode 100644
index a5d4e4af63..0000000000
--- a/main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From ef2b5e9f13a7f216d6d64aeccc6b33c1262faece Mon Sep 17 00:00:00 2001
2From: Rich Felker <dalias@aerifal.cx>
3Date: Tue, 16 Feb 2016 13:27:24 -0500
4Subject: [PATCH] fix unlikely corner cases in getopt's message printing
5
6like fputs (see commit 10a17dfbad2c267d885817abc9c7589fc7ff630b), the
7message printing code for getopt assumed that fwrite only returns 0 on
8failure, but it can also happen on success if the total length to be
9written is zero. programs with zero-length argv[0] were affected.
10
11commit 500c6886c654fd45e4926990fee2c61d816be197 introduced this
12problem in getopt by fixing the fwrite behavior to conform to the
13requirements of ISO C. previously the wrong expectations of the getopt
14code were met by the fwrite implementation.
15---
16 src/misc/getopt.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19diff --git a/src/misc/getopt.c b/src/misc/getopt.c
20index 9217983..8290aef 100644
21--- a/src/misc/getopt.c
22+++ b/src/misc/getopt.c
23@@ -17,9 +17,9 @@ void __getopt_msg(const char *a, const char *b, const char *c, size_t l)
24 FILE *f = stderr;
25 b = __lctrans_cur(b);
26 flockfile(f);
27- fwrite(a, strlen(a), 1, f)
28+ fputs(a, f)>=0
29 && fwrite(b, strlen(b), 1, f)
30- && fwrite(c, l, 1, f)
31+ && fwrite(c, 1, l, f)==l
32 && putc('\n', f);
33 funlockfile(f);
34 }
35--
362.7.1
37
diff --git a/main/musl/0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch b/main/musl/0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch
deleted file mode 100644
index 7204b6a4f4..0000000000
--- a/main/musl/0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch
+++ /dev/null
@@ -1,46 +0,0 @@
1From cf115059ba0ecd611008c89c78c37b62f8e6d6af Mon Sep 17 00:00:00 2001
2From: Rich Felker <dalias@aerifal.cx>
3Date: Tue, 16 Feb 2016 17:38:07 -0500
4Subject: [PATCH] in crypt-sha*, reject excessive rounds as error rather than
5 clamping
6
7the reference implementation clamps rounds to [1000,999999999]. we
8further limited rounds to at most 9999999 as a defense against extreme
9run times, but wrongly clamped instead of treating out-of-bounds
10values as an error, thereby producing implementation-specific hash
11results. fixing this should not break anything since values of rounds
12this high are not useful anyway.
13---
14 src/crypt/crypt_sha256.c | 2 +-
15 src/crypt/crypt_sha512.c | 2 +-
16 2 files changed, 2 insertions(+), 2 deletions(-)
17
18diff --git a/src/crypt/crypt_sha256.c b/src/crypt/crypt_sha256.c
19index d5f0b78..e885dc6 100644
20--- a/src/crypt/crypt_sha256.c
21+++ b/src/crypt/crypt_sha256.c
22@@ -230,7 +230,7 @@ static char *sha256crypt(const char *key, const char *setting, char *output)
23 if (u < ROUNDS_MIN)
24 r = ROUNDS_MIN;
25 else if (u > ROUNDS_MAX)
26- r = ROUNDS_MAX;
27+ return 0;
28 else
29 r = u;
30 /* needed when rounds is zero prefixed or out of bounds */
31diff --git a/src/crypt/crypt_sha512.c b/src/crypt/crypt_sha512.c
32index 1294e98..39970ca 100644
33--- a/src/crypt/crypt_sha512.c
34+++ b/src/crypt/crypt_sha512.c
35@@ -252,7 +252,7 @@ static char *sha512crypt(const char *key, const char *setting, char *output)
36 if (u < ROUNDS_MIN)
37 r = ROUNDS_MIN;
38 else if (u > ROUNDS_MAX)
39- r = ROUNDS_MAX;
40+ return 0;
41 else
42 r = u;
43 /* needed when rounds is zero prefixed or out of bounds */
44--
452.7.1
46
diff --git a/main/musl/APKBUILD b/main/musl/APKBUILD
index d2324c9c3d..2b6df2ee95 100644
--- a/main/musl/APKBUILD
+++ b/main/musl/APKBUILD
@@ -1,8 +1,8 @@
1# Contributor: William Pitcock <nenolod@dereferenced.org> 1# Contributor: William Pitcock <nenolod@dereferenced.org>
2# Maintainer: Timo Teräs <timo.teras@iki.fi> 2# Maintainer: Timo Teräs <timo.teras@iki.fi>
3pkgname=musl 3pkgname=musl
4pkgver=1.1.13 4pkgver=1.1.14
5pkgrel=2 5pkgrel=0
6pkgdesc="the musl c library (libc) implementation" 6pkgdesc="the musl c library (libc) implementation"
7url="http://www.musl-libc.org/" 7url="http://www.musl-libc.org/"
8arch="all" 8arch="all"
@@ -12,9 +12,6 @@ depends_dev="!uclibc-dev"
12makedepends="$depends_dev" 12makedepends="$depends_dev"
13subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg libc6-compat:compat" 13subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg libc6-compat:compat"
14source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz 14source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz
15 0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch
16 0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
17 0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch
18 15
19 ldconfig 16 ldconfig
20 __stack_chk_fail_local.c 17 __stack_chk_fail_local.c
@@ -130,28 +127,19 @@ compat() {
130 done 127 done
131} 128}
132 129
133md5sums="b8cb33a04ab461b55edcc807abf82241 musl-1.1.13.tar.gz 130md5sums="d529ce4a2f7f79d8c3fd4b8329417b57 musl-1.1.14.tar.gz
134b05c1a3f3b773610fdfe1fe44f41c5f8 0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch
1355b1ab9ab71069b9daafaf7a62ee3cf8e 0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
136bf74e577da2993ccf468787910a3d4d3 0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch
137830d01f7821b978df770b06db3790921 ldconfig 131830d01f7821b978df770b06db3790921 ldconfig
1380df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c 1320df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c
13957ef2c63b9ec6a2041694ace97d4ffa2 getconf.c 13357ef2c63b9ec6a2041694ace97d4ffa2 getconf.c
1402b941c4251cac44988a4abfc50e21267 getent.c 1342b941c4251cac44988a4abfc50e21267 getent.c
14145f92f8d59cf84d765de698a9578dbf4 iconv.c" 13545f92f8d59cf84d765de698a9578dbf4 iconv.c"
142sha256sums="bbacdc64f557d0c4857f7d2daf592c32c29aec1babbb94fcf01a2e05bed15013 musl-1.1.13.tar.gz 136sha256sums="35f6c00c84a6091bd5dab29eedde7508dae755ead92dcc0239f3677d1055b9b5 musl-1.1.14.tar.gz
143f32bfc319bb2e4dd6e20ab81dd838af991c6696dbd70db93926e8e3e446caf50 0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch
144e21ad9f7e9ff9089d3be03281366dd01a7487b21fb00dd7b7556f46e84f2e282 0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
1454542c63178f1f8d42d54a3e81a3db1978103d76f0d3ffb42b133bfe4b02f5de4 0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch
146b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig 137b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig
147299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c 138299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c
148d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c 139d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c
14968373a55e89ce85c562d941ccf588337d6cc6c9c17689d695f65cd7607134bbe getent.c 14068373a55e89ce85c562d941ccf588337d6cc6c9c17689d695f65cd7607134bbe getent.c
150f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c" 141f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c"
151sha512sums="d5f4a6fdb6a2cdbd7ab1ad5a8d91b1c690b3bd31d9049dfc022067019bba11952e375374eed982a0ddac7347d17f9ff2300178c4d5f27bdd8480933cc6e67802 musl-1.1.13.tar.gz 142sha512sums="9016246b44a7e6ef51477f0a246373c79f3e796c70031c3323be1b6c4c0518a2d4578f1aa712adfd9a80cdc1d71918bd7a35855052a0452b854755bf0cc2424e musl-1.1.14.tar.gz
152c634947ddf6d0b2e462cacff3920326a5677c06a3fc58f40cf99f22496b33882d25b4dce041a368fa2961d23bccbf9145a571fd40ea0d390cea1ab2849e681d7 0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch
1532a9b55bedfd13bb6f1ad6a10344294d672eaafbc4402c0f18cc31a9b5a62879a606e7fe4733c09295159a7458502886ed4d0c71170e66dca9a1bd228dbb08123 0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
1540a1715fb46204a13d9a29dfa9d86d3335890e75990d0d76c06daccb059f31498858b106966063e4b01c101f67ed139d8a24915d1ebeafec2491213d3e6bfdac9 0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch
1558d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig 1438d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
156062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c 144062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c
1570d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c 1450d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c