diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-10-28 08:39:33 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-10-28 08:40:39 +0200 |
commit | 360c374261ec3344a413b3d9c02cc8071e274e95 (patch) | |
tree | b1cd3d3334b73a569e0e44c954c9bd00702df3fa /main/musl/0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch | |
parent | bcd24d58cea9a53960df1e4e9dd33326926bc80d (diff) | |
download | aports-360c374261ec3344a413b3d9c02cc8071e274e95.tar.bz2 aports-360c374261ec3344a413b3d9c02cc8071e274e95.tar.xz |
main/musl: include git commits up to 71d23b310383
multiple bug fixes, and sys/timeb.h with ftime() implemented increasing
compatibility with old applications.
Diffstat (limited to 'main/musl/0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch')
-rw-r--r-- | main/musl/0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/main/musl/0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch b/main/musl/0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch deleted file mode 100644 index ebc1910c7f..0000000000 --- a/main/musl/0003-fix-off-by-one-error-in-getgrnam_r-and-getgrgid_r-cl.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 23b8e3bc95620b0bd90a78ce0d926942c12b45da Mon Sep 17 00:00:00 2001 -From: Rich Felker <dalias@aerifal.cx> -Date: Sun, 29 Sep 2013 02:52:33 -0400 -Subject: [PATCH] fix off-by-one error in getgrnam_r and getgrgid_r, clobbering - gr_name - -bug report and patch by Michael Forney. the terminating null pointer -at the end of the gr_mem array was overwriting the beginning of the -string data, causing the gr_name member to always be a zero-length -string. ---- - src/passwd/getgr_r.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/passwd/getgr_r.c b/src/passwd/getgr_r.c -index 234c901..3fe2e2b 100644 ---- a/src/passwd/getgr_r.c -+++ b/src/passwd/getgr_r.c -@@ -26,14 +26,14 @@ static int getgr_r(const char *name, gid_t gid, struct group *gr, char *buf, siz - while (__getgrent_a(f, gr, &line, &len, &mem, &nmem)) { - if (name && !strcmp(name, gr->gr_name) - || !name && gr->gr_gid == gid) { -- if (size < len + nmem*sizeof(char *) + 32) { -+ if (size < len + (nmem+1)*sizeof(char *) + 32) { - rv = ERANGE; - break; - } - *res = gr; - buf += (16-(uintptr_t)buf)%16; - gr->gr_mem = (void *)buf; -- buf += nmem*sizeof(char *); -+ buf += (nmem+1)*sizeof(char *); - memcpy(buf, line, len); - FIX(name); - FIX(passwd); --- -1.8.4 - |