Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/musl/files/
Date: Tue, 28 Nov 2017 20:05:16
Message-Id: 1511899507.2f8aa26cbaafbf11cf92c861cfb3e1a57a3c5e67.blueness@gentoo
1 commit: 2f8aa26cbaafbf11cf92c861cfb3e1a57a3c5e67
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Tue Nov 28 19:09:17 2017 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 28 20:05:07 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f8aa26c
7
8 sys-libs/musl: remove unused patches/file
9
10 sys-libs/musl/files/getent | 45 ------------------
11 sys-libs/musl/files/musl-1.1.15-CVE.patch | 68 ----------------------------
12 sys-libs/musl/files/musl-1.1.15-assert.patch | 43 ------------------
13 3 files changed, 156 deletions(-)
14
15 diff --git a/sys-libs/musl/files/getent b/sys-libs/musl/files/getent
16 deleted file mode 100644
17 index b7de424354b..00000000000
18 --- a/sys-libs/musl/files/getent
19 +++ /dev/null
20 @@ -1,45 +0,0 @@
21 -#!/bin/sh
22 -# This files is part of uClibc.
23 -# Distributed under the terms of the Lesser GNU General Public License v2
24 -#
25 -# Closely (not perfectly) emulate the behavior of glibc's getent utility
26 -#
27 -#passwd|shadow|group|aliases|hosts|networks|ethers|netgroup|protocols|services|rpc
28 -# only returns the first match (by design)
29 -# dns based search is not supported (hosts,networks)
30 -# case-insensitive matches not supported (ethers; others?)
31 -# may return false-positives (hosts,protocols,rpc,services,ethers)
32 -
33 -[ -z "$PATH" ] && PATH="/bin:/usr/bin" || PATH="${PATH}:/bin:/usr/bin"
34 -export PATH
35 -
36 -file="/etc/$1"
37 -case $1 in
38 - passwd|group)
39 - match="^$2:\|^[^:]*:[^:]*:$2:" ;;
40 - shadow)
41 - match="^$2:" ;;
42 - networks|netgroup)
43 - match="^[[:space:]]*$2\>" ;;
44 - hosts|protocols|rpc|services|ethers)
45 - match="\<$2\>" ;;
46 - aliases)
47 - match="^[[:space:]]*$2[[:space:]]*:" ;;
48 - ""|-h|--help)
49 - echo "USAGE: $0 database [key]"
50 - exit 0 ;;
51 - *)
52 - echo "$0: Unknown database: $1" 1>&2
53 - exit 1 ;;
54 -esac
55 -
56 -if [ ! -f "$file" ] ; then
57 - echo "$0: Could not find database file for $1" 1>&2
58 - exit 1
59 -fi
60 -
61 -if [ $# -eq 1 ] ; then
62 - exec cat "$file"
63 -else
64 - sed "s/#.*//; /$match/q; d" "$file" | grep . || exit 2
65 -fi
66
67 diff --git a/sys-libs/musl/files/musl-1.1.15-CVE.patch b/sys-libs/musl/files/musl-1.1.15-CVE.patch
68 deleted file mode 100644
69 index 64fbbdcd8eb..00000000000
70 --- a/sys-libs/musl/files/musl-1.1.15-CVE.patch
71 +++ /dev/null
72 @@ -1,68 +0,0 @@
73 -From c3edc06d1e1360f3570db9155d6b318ae0d0f0f7 Mon Sep 17 00:00:00 2001
74 -From: Rich Felker <dalias@×××××××.cx>
75 -Date: Thu, 06 Oct 2016 22:34:58 +0000
76 -Subject: fix missing integer overflow checks in regexec buffer size computations
77 -
78 -most of the possible overflows were already ruled out in practice by
79 -regcomp having already succeeded performing larger allocations.
80 -however at least the num_states*num_tags multiplication can clearly
81 -overflow in practice. for safety, check them all, and use the proper
82 -type, size_t, rather than int.
83 -
84 -also improve comments, use calloc in place of malloc+memset, and
85 -remove bogus casts.
86 ----
87 -diff --git a/src/regex/regexec.c b/src/regex/regexec.c
88 -index 16c5d0a..dd52319 100644
89 ---- a/src/regex/regexec.c
90 -+++ b/src/regex/regexec.c
91 -@@ -34,6 +34,7 @@
92 - #include <wchar.h>
93 - #include <wctype.h>
94 - #include <limits.h>
95 -+#include <stdint.h>
96 -
97 - #include <regex.h>
98 -
99 -@@ -206,11 +207,24 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
100 -
101 - /* Allocate memory for temporary data required for matching. This needs to
102 - be done for every matching operation to be thread safe. This allocates
103 -- everything in a single large block from the stack frame using alloca()
104 -- or with malloc() if alloca is unavailable. */
105 -+ everything in a single large block with calloc(). */
106 - {
107 -- int tbytes, rbytes, pbytes, xbytes, total_bytes;
108 -+ size_t tbytes, rbytes, pbytes, xbytes, total_bytes;
109 - char *tmp_buf;
110 -+
111 -+ /* Ensure that tbytes and xbytes*num_states cannot overflow, and that
112 -+ * they don't contribute more than 1/8 of SIZE_MAX to total_bytes. */
113 -+ if (num_tags > SIZE_MAX/(8 * sizeof(int) * tnfa->num_states))
114 -+ goto error_exit;
115 -+
116 -+ /* Likewise check rbytes. */
117 -+ if (tnfa->num_states+1 > SIZE_MAX/(8 * sizeof(*reach_next)))
118 -+ goto error_exit;
119 -+
120 -+ /* Likewise check pbytes. */
121 -+ if (tnfa->num_states > SIZE_MAX/(8 * sizeof(*reach_pos)))
122 -+ goto error_exit;
123 -+
124 - /* Compute the length of the block we need. */
125 - tbytes = sizeof(*tmp_tags) * num_tags;
126 - rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
127 -@@ -221,10 +235,9 @@ tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string,
128 - + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;
129 -
130 - /* Allocate the memory. */
131 -- buf = xmalloc((unsigned)total_bytes);
132 -+ buf = calloc(total_bytes, 1);
133 - if (buf == NULL)
134 - return REG_ESPACE;
135 -- memset(buf, 0, (size_t)total_bytes);
136 -
137 - /* Get the various pointers within tmp_buf (properly aligned). */
138 - tmp_tags = (void *)buf;
139 ---
140 -cgit v0.9.0.3-65-g4555
141
142 diff --git a/sys-libs/musl/files/musl-1.1.15-assert.patch b/sys-libs/musl/files/musl-1.1.15-assert.patch
143 deleted file mode 100644
144 index d531d172764..00000000000
145 --- a/sys-libs/musl/files/musl-1.1.15-assert.patch
146 +++ /dev/null
147 @@ -1,43 +0,0 @@
148 -From e738b8cbe64b6dd3ed9f47b6d4cd7eb2c422b38d Mon Sep 17 00:00:00 2001
149 -From: Rich Felker <dalias@×××××××.cx>
150 -Date: Tue, 30 Aug 2016 20:39:54 +0000
151 -Subject: restore _Noreturn to __assert_fail
152 -
153 -this reverts commit 2c1f8fd5da3306fd7c8a2267467e44eb61f12dd4. without
154 -the _Noreturn attribute, the compiler cannot use asserts to perform
155 -reachability/range analysis. this leads to missed optimizations and
156 -spurious warnings.
157 -
158 -the original backtrace problem that prompted the removal of _Noreturn
159 -was not clearly documented at the time, but it seems to happen only
160 -when libc was built without -g, which also breaks many other
161 -backtracing cases.
162 ----
163 -diff --git a/include/assert.h b/include/assert.h
164 -index e679adb..d14ec94 100644
165 ---- a/include/assert.h
166 -+++ b/include/assert.h
167 -@@ -16,7 +16,7 @@
168 - extern "C" {
169 - #endif
170 -
171 --void __assert_fail (const char *, const char *, int, const char *);
172 -+_Noreturn void __assert_fail (const char *, const char *, int, const char *);
173 -
174 - #ifdef __cplusplus
175 - }
176 -diff --git a/src/exit/assert.c b/src/exit/assert.c
177 -index e87442a..49b0dc3 100644
178 ---- a/src/exit/assert.c
179 -+++ b/src/exit/assert.c
180 -@@ -1,7 +1,7 @@
181 - #include <stdio.h>
182 - #include <stdlib.h>
183 -
184 --void __assert_fail(const char *expr, const char *file, int line, const char *func)
185 -+_Noreturn void __assert_fail(const char *expr, const char *file, int line, const char *func)
186 - {
187 - fprintf(stderr, "Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line);
188 - fflush(NULL);
189 ---
190 -cgit v0.9.0.3-65-g4555