This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.26.9000-1016-ge184ac3
- From: azanella at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 19 Dec 2017 18:02:56 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.26.9000-1016-ge184ac3
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via e184ac3a105a4a45b920bf2cdaa701a683c781a2 (commit)
via d711a00f93fa964f41a53839228598fbf1a6b482 (commit)
from 6f58c10dedc6f3be2b537e15219c4dfe49163d8e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e184ac3a105a4a45b920bf2cdaa701a683c781a2
commit e184ac3a105a4a45b920bf2cdaa701a683c781a2
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Dec 19 14:44:50 2017 -0200
glob: Silence warning about void pointer arithmetic
Sync with gnulib 0e14f025d2.
Checked on x86_64-linux-gnu.
* lib/glob.c (glob): Use a 'char *', not a 'void *', in pointer
arithmetic.
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
diff --git a/ChangeLog b/ChangeLog
index af45054..a28c50c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2017-12-19 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+ * lib/glob.c (glob): Use a 'char *', not a 'void *', in pointer
+ arithmetic.
+
* lib/glob.c (glob): Do not pass NULL to mempcpy.
2017-12-19 Joseph Myers <joseph@codesourcery.com>
diff --git a/posix/glob.c b/posix/glob.c
index 511ec4b..8557196 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -641,7 +641,8 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
{
# if defined HAVE_GETPWNAM_R || defined _LIBC
size_t ssize = strlen (s.data) + 1;
- err = getpwnam_r (s.data, &pwbuf, s.data + ssize,
+ char *sdata = s.data;
+ err = getpwnam_r (sdata, &pwbuf, sdata + ssize,
s.length - ssize, &p);
# else
p = getpwnam (s.data);
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d711a00f93fa964f41a53839228598fbf1a6b482
commit d711a00f93fa964f41a53839228598fbf1a6b482
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Tue Dec 19 14:27:09 2017 -0200
glob: pacify fuzzer for mempcpy
Problem reported by Tim Rühsen [1]. Sync with gnulib 0e14f025d2.
[1] https://lists.gnu.org/archive/html/bug-gnulib/2017-10/msg00054.html
Checked on x86_64-linux-gnu.
* lib/glob.c (glob): Do not pass NULL to mempcpy.
Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
diff --git a/ChangeLog b/ChangeLog
index ae5cc39..af45054 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-12-19 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * lib/glob.c (glob): Do not pass NULL to mempcpy.
+
2017-12-19 Joseph Myers <joseph@codesourcery.com>
* sysdeps/x86_64/fpu/libm-test-ulps: Update.
diff --git a/posix/glob.c b/posix/glob.c
index cb39779..511ec4b 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -826,6 +826,7 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
{
size_t home_len = strlen (p->pw_dir);
size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
+ char *d;
if (__glibc_unlikely (malloc_dirname))
free (dirname);
@@ -845,8 +846,10 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
}
malloc_dirname = 1;
}
- *((char *) mempcpy (mempcpy (dirname, p->pw_dir, home_len),
- end_name, rest_len)) = '\0';
+ d = mempcpy (dirname, p->pw_dir, home_len);
+ if (end_name != NULL)
+ d = mempcpy (d, end_name, rest_len);
+ *d = '\0';
dirlen = home_len + rest_len;
dirname_modified = 1;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
posix/glob.c | 10 +++++++---
2 files changed, 14 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU C Library master sources