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.18-197-gb1fe1f2


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  b1fe1f2b834635372df6c68312fd6b3a8e559595 (commit)
      from  5f855e3598a576c35e54623a13b256f3e87fcd4d (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=b1fe1f2b834635372df6c68312fd6b3a8e559595

commit b1fe1f2b834635372df6c68312fd6b3a8e559595
Author: OndÅ?ej Bílka <neleai@seznam.cz>
Date:   Thu Oct 3 19:53:45 2013 +0200

    BZ #431 Fix manual of strncat/wcsncat.

diff --git a/ChangeLog b/ChangeLog
index 12c2417..e08ff75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-03  OndÅ?ej Bílka  <neleai@seznam.cz>
+
+	[BZ #431]
+	* manual/string.texi: Fix strncat and wcsncat.
+
 2013-10-03  Brooks Moses  <bmoses@google.com>
 
 	[BZ #15915]
diff --git a/NEWS b/NEWS
index f77d809..597b0d8 100644
--- a/NEWS
+++ b/NEWS
@@ -9,11 +9,12 @@ Version 2.19
 
 * The following bugs are resolved with this release:
 
-  13985, 14155, 14547, 14699, 15048, 15400, 15427, 15522, 15531, 15532,
-  15608, 15609, 15610, 15640, 15681, 15736, 15748, 15749, 15754, 15760,
-  15797, 15844, 15849, 15855, 15856, 15857, 15859, 15867, 15886, 15887,
-  15890, 15892, 15893, 15895, 15897, 15905, 15909, 15919, 15921, 15923,
-  15939, 15963, 15966, 15988.
+  431, 13985, 14155, 14547, 14699, 15048, 15400, 15427, 15522, 15531,
+  15532, 15608, 15609, 15610, 15640, 15681, 15736, 15748, 15749, 15754,
+  15760, 15797, 15844, 15849, 15855, 15856, 15857, 15859, 15867, 15886,
+  15887, 15890, 15892, 15893, 15895, 15897, 15905, 15909, 15919, 15921,
+  15887, 15890, 15892, 15893, 15895, 15897, 15905, 15909, 15919, 15921,
+  15923, 15939, 15963, 15966, 15988.
 
 * CVE-2012-4412 The strcoll implementation caches indices and rules for
   large collation sequences to optimize multiple passes.  This cache
diff --git a/manual/string.texi b/manual/string.texi
index 3329761..1e45d9d 100644
--- a/manual/string.texi
+++ b/manual/string.texi
@@ -955,8 +955,8 @@ The @code{strncat} function could be implemented like this:
 char *
 strncat (char *to, const char *from, size_t size)
 @{
-  to[strlen (to) + size] = '\0';
-  strncpy (to + strlen (to), from, size);
+  memcpy (to + strlen (to), from, strnlen (from, size));
+  to[strlen (to) + strnlen (from, size)] = '\0';
   return to;
 @}
 @end group
@@ -982,8 +982,8 @@ wchar_t *
 wcsncat (wchar_t *restrict wto, const wchar_t *restrict wfrom,
          size_t size)
 @{
-  wto[wcslen (to) + size] = L'\0';
-  wcsncpy (wto + wcslen (wto), wfrom, size);
+  memcpy (wto + wcslen (wto), wfrom, wcsnlen (wfrom, size) * sizeof (wchar_t));
+  wto[wcslen (to) + wcsnlen (wfrom, size)] = '\0';
   return wto;
 @}
 @end group

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

Summary of changes:
 ChangeLog          |    5 +++++
 NEWS               |   11 ++++++-----
 manual/string.texi |    8 ++++----
 3 files changed, 15 insertions(+), 9 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]