This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.26.9000-750-ge69897b


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  e69897bf202e18034cbef26f363bae64de70a196 (commit)
      from  1ffe1ccb6ec5771765f1f6f0c439ed07bf345d67 (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=e69897bf202e18034cbef26f363bae64de70a196

commit e69897bf202e18034cbef26f363bae64de70a196
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Nov 12 22:00:28 2017 -0800

    timezone: pacify GCC -Wstringop-truncation
    
    Problem reported by Martin Sebor in:
    https://sourceware.org/ml/libc-alpha/2017-11/msg00336.html
    * timezone/zic.c (writezone): Use memcpy, not strncpy.

diff --git a/ChangeLog b/ChangeLog
index 32b57bc..fad2bd0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-11-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+	timezone: pacify GCC -Wstringop-truncation
+	Problem reported by Martin Sebor in:
+	https://sourceware.org/ml/libc-alpha/2017-11/msg00336.html
+	* timezone/zic.c (writezone): Use memcpy, not strncpy.
+
 2017-11-12  Florian Weimer  <fweimer@redhat.com>
 
 	* support/support.h (xstrndup): Declare.
diff --git a/timezone/zic.c b/timezone/zic.c
index 946bf6f..e738386 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -1949,7 +1949,7 @@ writezone(const char *const name, const char *const string, char version)
 		}
 #define DO(field)	fwrite(tzh.field, sizeof tzh.field, 1, fp)
 		tzh = tzh0;
-		strncpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
+		memcpy(tzh.tzh_magic, TZ_MAGIC, sizeof tzh.tzh_magic);
 		tzh.tzh_version[0] = version;
 		convert(thistypecnt, tzh.tzh_ttisgmtcnt);
 		convert(thistypecnt, tzh.tzh_ttisstdcnt);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog      |    7 +++++++
 timezone/zic.c |    2 +-
 2 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]