diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-02-22 06:22:47 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-02-22 06:22:47 +0000 |
commit | d87e4ffb69c7ebea24a593258423391b3e577b13 (patch) | |
tree | 83456173c17493390ad70c390a7efa160ac3cd1c | |
parent | bed2ee570d7e736912b5769aa4964410f195cdcb (diff) | |
download | alpine_aports-d87e4ffb69c7ebea24a593258423391b3e577b13.tar.bz2 alpine_aports-d87e4ffb69c7ebea24a593258423391b3e577b13.tar.xz alpine_aports-d87e4ffb69c7ebea24a593258423391b3e577b13.zip |
main/musl: upgrade to 1.1.14
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 @@ | |||
1 | From 10a17dfbad2c267d885817abc9c7589fc7ff630b Mon Sep 17 00:00:00 2001 | ||
2 | From: Rich Felker <dalias@aerifal.cx> | ||
3 | Date: Tue, 16 Feb 2016 13:26:16 -0500 | ||
4 | Subject: [PATCH] fix assumption in fputs that fwrite returning 0 implies an | ||
5 | error | ||
6 | |||
7 | internally, the idiom of passing nmemb=1 to fwrite and interpreting | ||
8 | the return value of fwrite (which is necessarily 0 or 1) as | ||
9 | failure/success is fairly widely used. this is not correct, however, | ||
10 | when the size argument is unknown and may be zero, since C requires | ||
11 | fwrite to return 0 in that special case. previously fwrite always | ||
12 | returned nmemb on success, but this was changed for conformance with | ||
13 | ISO C by commit 500c6886c654fd45e4926990fee2c61d816be197. | ||
14 | --- | ||
15 | src/stdio/fputs.c | 3 ++- | ||
16 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/stdio/fputs.c b/src/stdio/fputs.c | ||
19 | index 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 | -- | ||
33 | 2.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 @@ | |||
1 | From ef2b5e9f13a7f216d6d64aeccc6b33c1262faece Mon Sep 17 00:00:00 2001 | ||
2 | From: Rich Felker <dalias@aerifal.cx> | ||
3 | Date: Tue, 16 Feb 2016 13:27:24 -0500 | ||
4 | Subject: [PATCH] fix unlikely corner cases in getopt's message printing | ||
5 | |||
6 | like fputs (see commit 10a17dfbad2c267d885817abc9c7589fc7ff630b), the | ||
7 | message printing code for getopt assumed that fwrite only returns 0 on | ||
8 | failure, but it can also happen on success if the total length to be | ||
9 | written is zero. programs with zero-length argv[0] were affected. | ||
10 | |||
11 | commit 500c6886c654fd45e4926990fee2c61d816be197 introduced this | ||
12 | problem in getopt by fixing the fwrite behavior to conform to the | ||
13 | requirements of ISO C. previously the wrong expectations of the getopt | ||
14 | code were met by the fwrite implementation. | ||
15 | --- | ||
16 | src/misc/getopt.c | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/src/misc/getopt.c b/src/misc/getopt.c | ||
20 | index 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 | -- | ||
36 | 2.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 @@ | |||
1 | From cf115059ba0ecd611008c89c78c37b62f8e6d6af Mon Sep 17 00:00:00 2001 | ||
2 | From: Rich Felker <dalias@aerifal.cx> | ||
3 | Date: Tue, 16 Feb 2016 17:38:07 -0500 | ||
4 | Subject: [PATCH] in crypt-sha*, reject excessive rounds as error rather than | ||
5 | clamping | ||
6 | |||
7 | the reference implementation clamps rounds to [1000,999999999]. we | ||
8 | further limited rounds to at most 9999999 as a defense against extreme | ||
9 | run times, but wrongly clamped instead of treating out-of-bounds | ||
10 | values as an error, thereby producing implementation-specific hash | ||
11 | results. fixing this should not break anything since values of rounds | ||
12 | this 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 | |||
18 | diff --git a/src/crypt/crypt_sha256.c b/src/crypt/crypt_sha256.c | ||
19 | index 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 */ | ||
31 | diff --git a/src/crypt/crypt_sha512.c b/src/crypt/crypt_sha512.c | ||
32 | index 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 | -- | ||
45 | 2.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> |
3 | pkgname=musl | 3 | pkgname=musl |
4 | pkgver=1.1.13 | 4 | pkgver=1.1.14 |
5 | pkgrel=2 | 5 | pkgrel=0 |
6 | pkgdesc="the musl c library (libc) implementation" | 6 | pkgdesc="the musl c library (libc) implementation" |
7 | url="http://www.musl-libc.org/" | 7 | url="http://www.musl-libc.org/" |
8 | arch="all" | 8 | arch="all" |
@@ -12,9 +12,6 @@ depends_dev="!uclibc-dev" | |||
12 | makedepends="$depends_dev" | 12 | makedepends="$depends_dev" |
13 | subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg libc6-compat:compat" | 13 | subpackages="$pkgname-dev $pkgname-utils $pkgname-dbg libc6-compat:compat" |
14 | source="http://www.musl-libc.org/releases/musl-$pkgver.tar.gz | 14 | source="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 | ||
133 | md5sums="b8cb33a04ab461b55edcc807abf82241 musl-1.1.13.tar.gz | 130 | md5sums="d529ce4a2f7f79d8c3fd4b8329417b57 musl-1.1.14.tar.gz |
134 | b05c1a3f3b773610fdfe1fe44f41c5f8 0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch | ||
135 | 5b1ab9ab71069b9daafaf7a62ee3cf8e 0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch | ||
136 | bf74e577da2993ccf468787910a3d4d3 0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch | ||
137 | 830d01f7821b978df770b06db3790921 ldconfig | 131 | 830d01f7821b978df770b06db3790921 ldconfig |
138 | 0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c | 132 | 0df687757221bbb0fc1aa67f1bd646f9 __stack_chk_fail_local.c |
139 | 57ef2c63b9ec6a2041694ace97d4ffa2 getconf.c | 133 | 57ef2c63b9ec6a2041694ace97d4ffa2 getconf.c |
140 | 2b941c4251cac44988a4abfc50e21267 getent.c | 134 | 2b941c4251cac44988a4abfc50e21267 getent.c |
141 | 45f92f8d59cf84d765de698a9578dbf4 iconv.c" | 135 | 45f92f8d59cf84d765de698a9578dbf4 iconv.c" |
142 | sha256sums="bbacdc64f557d0c4857f7d2daf592c32c29aec1babbb94fcf01a2e05bed15013 musl-1.1.13.tar.gz | 136 | sha256sums="35f6c00c84a6091bd5dab29eedde7508dae755ead92dcc0239f3677d1055b9b5 musl-1.1.14.tar.gz |
143 | f32bfc319bb2e4dd6e20ab81dd838af991c6696dbd70db93926e8e3e446caf50 0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch | ||
144 | e21ad9f7e9ff9089d3be03281366dd01a7487b21fb00dd7b7556f46e84f2e282 0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch | ||
145 | 4542c63178f1f8d42d54a3e81a3db1978103d76f0d3ffb42b133bfe4b02f5de4 0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch | ||
146 | b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig | 137 | b4a2c06db38742e8c42c3c9838b285a7d8cdac6c091ff3df5ff9a15f1e41b9c7 ldconfig |
147 | 299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c | 138 | 299a7d75a09de3e2e11e7fb4acc3182e4a14e868093d2f30938fce9bfcff13da __stack_chk_fail_local.c |
148 | d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c | 139 | d87d0cbb3690ae2c5d8cc218349fd8278b93855dd625deaf7ae50e320aad247c getconf.c |
149 | 68373a55e89ce85c562d941ccf588337d6cc6c9c17689d695f65cd7607134bbe getent.c | 140 | 68373a55e89ce85c562d941ccf588337d6cc6c9c17689d695f65cd7607134bbe getent.c |
150 | f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c" | 141 | f79a2930a2e5bb0624321589edf8b889d1e9b603e01e6b7ae214616605b3fdd7 iconv.c" |
151 | sha512sums="d5f4a6fdb6a2cdbd7ab1ad5a8d91b1c690b3bd31d9049dfc022067019bba11952e375374eed982a0ddac7347d17f9ff2300178c4d5f27bdd8480933cc6e67802 musl-1.1.13.tar.gz | 142 | sha512sums="9016246b44a7e6ef51477f0a246373c79f3e796c70031c3323be1b6c4c0518a2d4578f1aa712adfd9a80cdc1d71918bd7a35855052a0452b854755bf0cc2424e musl-1.1.14.tar.gz |
152 | c634947ddf6d0b2e462cacff3920326a5677c06a3fc58f40cf99f22496b33882d25b4dce041a368fa2961d23bccbf9145a571fd40ea0d390cea1ab2849e681d7 0001-fix-assumption-in-fputs-that-fwrite-returning-0-impl.patch | ||
153 | 2a9b55bedfd13bb6f1ad6a10344294d672eaafbc4402c0f18cc31a9b5a62879a606e7fe4733c09295159a7458502886ed4d0c71170e66dca9a1bd228dbb08123 0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch | ||
154 | 0a1715fb46204a13d9a29dfa9d86d3335890e75990d0d76c06daccb059f31498858b106966063e4b01c101f67ed139d8a24915d1ebeafec2491213d3e6bfdac9 0003-in-crypt-sha-reject-excessive-rounds-as-error-rather.patch | ||
155 | 8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig | 143 | 8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig |
156 | 062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c | 144 | 062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c |
157 | 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c | 145 | 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c |