aboutsummaryrefslogtreecommitdiff
path: root/packages/glibc/2.12.1/0048-getlogin_r-use-strnlen.patch
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2022-05-08 14:06:21 +1200
committerChris Packham <judge.packham@gmail.com>2022-05-10 19:46:53 +1200
commit6d5227b63b096b052dde8717822db259971db515 (patch)
tree367194d0497ac11587d4740d8c180009605a9e27 /packages/glibc/2.12.1/0048-getlogin_r-use-strnlen.patch
parent53bbdc74252f68a3800d222dddee69e63b617bf9 (diff)
downloadcrosstool-ng-6d5227b63b096b052dde8717822db259971db515.tar.gz
crosstool-ng-6d5227b63b096b052dde8717822db259971db515.tar.bz2
crosstool-ng-6d5227b63b096b052dde8717822db259971db515.zip
Remove obsolete glibc 2.12.1
glibc 2.12.1 was marked as obsolete. Now that the 1.25.0 release is out this version can be removed completely. As glibc 2.12.1 was the last remaining version supported by glibc-ports support for glibc-ports is also removed. Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'packages/glibc/2.12.1/0048-getlogin_r-use-strnlen.patch')
-rw-r--r--packages/glibc/2.12.1/0048-getlogin_r-use-strnlen.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/packages/glibc/2.12.1/0048-getlogin_r-use-strnlen.patch b/packages/glibc/2.12.1/0048-getlogin_r-use-strnlen.patch
deleted file mode 100644
index 15a16bda..00000000
--- a/packages/glibc/2.12.1/0048-getlogin_r-use-strnlen.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-commit 4bae615022cb5a5da79ccda83cc6c9ba9f2d479c
-Author: Joseph Myers <joseph@codesourcery.com>
-Date: Wed Nov 22 18:44:23 2017 +0000
-
- Avoid use of strlen in getlogin_r (bug 22447).
-
- Building glibc with current mainline GCC fails, among other reasons,
- because of an error for use of strlen on the nonstring ut_user field.
- This patch changes the problem code in getlogin_r to use __strnlen
- instead. It also needs to set the trailing NUL byte of the result
- explicitly, because of the case where ut_user does not have such a
- trailing NUL byte (but the result should always have one).
-
- Tested for x86_64. Also tested that, in conjunction with
- <https://sourceware.org/ml/libc-alpha/2017-11/msg00797.html>, it fixes
- the build for arm with mainline GCC.
-
- [BZ #22447]
- * sysdeps/unix/getlogin_r.c (__getlogin_r): Use __strnlen not
- strlen to compute length of ut_user and set trailing NUL byte of
- result explicitly.
-
----
- sysdeps/unix/getlogin_r.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/sysdeps/unix/getlogin_r.c
-+++ b/sysdeps/unix/getlogin_r.c
-@@ -83,7 +83,7 @@
-
- if (result == 0)
- {
-- size_t needed = strlen (ut->ut_user) + 1;
-+ size_t needed = __strnlen (ut->ut_user, UT_NAMESIZE) + 1;
-
- if (needed > name_len)
- {
-@@ -92,7 +92,8 @@
- }
- else
- {
-- memcpy (name, ut->ut_user, needed);
-+ memcpy (name, ut->ut_user, needed - 1);
-+ name[needed - 1] = 0;
- result = 0;
- }
- }