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.28.9000-138-gdab9c34


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  dab9c3488e86d5304f3e4b778933760374494a82 (commit)
       via  e4e4fde51a309801af5eed72d3494cbf4b7737aa (commit)
      from  d3a43e49f342c4663af0fff9d95000cfe26867c3 (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=dab9c3488e86d5304f3e4b778933760374494a82

commit dab9c3488e86d5304f3e4b778933760374494a82
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Tue Sep 18 15:02:11 2018 -0700

    Simplify tzfile fstat failure code
    
    [BZ #21716]
    * time/tzfile.c (__tzfile_read): Simplify slightly.

diff --git a/ChangeLog b/ChangeLog
index 5d8c035..0be5afd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
 
+	Simplify tzfile fstat failure code
+	[BZ #21716]
+	* time/tzfile.c (__tzfile_read): Simplify slightly.
+
 	Fix tzfile low-memory assertion failure
 	[BZ #21716]
 	* time/tzfile.c (__tzfile_read): Check for memory exhaustion
diff --git a/time/tzfile.c b/time/tzfile.c
index ea6e940..72ef75f 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -168,10 +168,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
 
   /* Get information about the file we are actually using.  */
   if (fstat64 (__fileno (f), &st) != 0)
-    {
-      fclose (f);
-      goto ret_free_transitions;
-    }
+    goto lose;
 
   free ((void *) transitions);
   transitions = NULL;

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e4e4fde51a309801af5eed72d3494cbf4b7737aa

commit e4e4fde51a309801af5eed72d3494cbf4b7737aa
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Tue Sep 18 15:02:10 2018 -0700

    Fix tzfile low-memory assertion failure
    
    [BZ #21716]
    * time/tzfile.c (__tzfile_read): Check for memory exhaustion
    when registering time zone abbreviations.

diff --git a/ChangeLog b/ChangeLog
index 1403616..5d8c035 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-09-18  Paul Eggert  <eggert@cs.ucla.edu>
+
+	Fix tzfile low-memory assertion failure
+	[BZ #21716]
+	* time/tzfile.c (__tzfile_read): Check for memory exhaustion
+	when registering time zone abbreviations.
+
 2018-09-18  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/bits/mman.h: New file.
diff --git a/time/tzfile.c b/time/tzfile.c
index 2a385b9..ea6e940 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -410,7 +410,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
 
   /* First "register" all timezone names.  */
   for (i = 0; i < num_types; ++i)
-    (void) __tzstring (&zone_names[types[i].idx]);
+    if (__tzstring (&zone_names[types[i].idx]) == NULL)
+      goto ret_free_transitions;
 
   /* Find the standard and daylight time offsets used by the rule file.
      We choose the offsets in the types of each flavor that are

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

Summary of changes:
 ChangeLog     |   11 +++++++++++
 time/tzfile.c |    8 +++-----
 2 files changed, 14 insertions(+), 5 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]