mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-31 11:21:04 +02:00
Merge pull request #2033 from dm0-/bugs-1394
This fixes coreos/bugs#1394.
This commit is contained in:
commit
5dc9407b38
@ -0,0 +1,31 @@
|
||||
--- gshadow/fgetsgent_r.c
|
||||
+++ gshadow/fgetsgent_r.c
|
||||
@@ -37,6 +37,7 @@
|
||||
struct sgrp **result)
|
||||
{
|
||||
char *p;
|
||||
+ int rc;
|
||||
|
||||
_IO_flockfile (stream);
|
||||
do
|
||||
@@ -64,11 +65,18 @@
|
||||
} while (*p == '\0' || *p == '#' || /* Ignore empty and comment lines. */
|
||||
/* Parse the line. If it is invalid, loop to
|
||||
get the next line of the file to parse. */
|
||||
- ! parse_line (buffer, (void *) resbuf, (void *) buffer, buflen,
|
||||
- &errno));
|
||||
+ !(rc = parse_line (buffer, (void *) resbuf,
|
||||
+ (void *) buffer, buflen, &errno)));
|
||||
|
||||
_IO_funlockfile (stream);
|
||||
|
||||
+ if (rc < 0)
|
||||
+ {
|
||||
+ *result = NULL;
|
||||
+ __set_errno (ERANGE);
|
||||
+ return errno;
|
||||
+ }
|
||||
+
|
||||
*result = resbuf;
|
||||
return 0;
|
||||
}
|
@ -160,6 +160,9 @@ eblit-src_unpack-pre() {
|
||||
eblit-src_prepare-post() {
|
||||
cd "${S}"
|
||||
|
||||
einfo "Patching to avoid segfaults on long /etc/gshadow lines"
|
||||
epatch "${FILESDIR}"/2.23/glibc-2.23-gshadow-handle-erange.patch
|
||||
|
||||
if use hardened ; then
|
||||
einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
|
||||
gcc-specs-pie && epatch "${FILESDIR}"/2.17/glibc-2.17-hardened-pie.patch
|
Loading…
x
Reference in New Issue
Block a user