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.25-762-gf8cef4d
- From: dj at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 19 Jul 2017 17:19:45 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-762-gf8cef4d
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 f8cef4d07d9641e27629bd3ce2d13f5d702fb251 (commit)
from 4f329ea996af7e3414b1806c86f6d32866d34b36 (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=f8cef4d07d9641e27629bd3ce2d13f5d702fb251
commit f8cef4d07d9641e27629bd3ce2d13f5d702fb251
Author: DJ Delorie <dj@delorie.com>
Date: Wed Jul 19 13:14:34 2017 -0400
Fix cast-after-dereference
Original code was dereferencing a char*, then casting the value
to size_t. Should cast the pointer to size_t* then deference.
diff --git a/ChangeLog b/ChangeLog
index d514f08..8618e26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2017-07-19 DJ Delorie <dj@delorie.com>
+
+ * grp/grp-merge.c (libc_hidden_def): Fix cast-after-dereference.
+
2017-07-19 H.J. Lu <hongjiu.lu@intel.com>
[BZ #21741]
diff --git a/grp/grp-merge.c b/grp/grp-merge.c
index 6590e5d..035e7a6 100644
--- a/grp/grp-merge.c
+++ b/grp/grp-merge.c
@@ -137,7 +137,7 @@ __merge_grp (struct group *savedgrp, char *savedbuf, char *savedend,
/* Get the count of group members from the last sizeof (size_t) bytes in the
mergegrp buffer. */
- savedmemcount = (size_t) *(savedend - sizeof (size_t));
+ savedmemcount = *(size_t *) (savedend - sizeof (size_t));
/* Get the count of new members to add. */
for (memcount = 0; mergegrp->gr_mem[memcount]; memcount++)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
grp/grp-merge.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources