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.22-9-g782723d


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  782723d6d8c7b599c4fdbbd359a7bc57b25044ad (commit)
      from  cf36e5034fa8ed5d44036bce09a55a7f00d19252 (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=782723d6d8c7b599c4fdbbd359a7bc57b25044ad

commit 782723d6d8c7b599c4fdbbd359a7bc57b25044ad
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Aug 5 08:15:51 2015 -0700

    Also check dead->data[category] != NULL
    
    _nl_load_locale_from_archive (int category, const char **namep)
    
    has
    
     for (cnt = 0; cnt < __LC_LAST; ++cnt)
        if (cnt != LC_ALL)
          {
            lia->data[cnt] = _nl_intern_locale_data (cnt,
                                                     results[cnt].addr,
                                                     results[cnt].len);
            if (__glibc_likely (lia->data[cnt] != NULL))
              {
    ...
              }
          }
    
    lia->data[cnt] can be NULL, which happens to en_US.UTF-8 with
    LC_COLLATE.  But this won't happen if glibc is configured with
    --enable-hardcoded-path-in-tests.  We should also check
    dead->data[category] != NULL.
    
    	* locale/loadarchive.c (_nl_archive_subfreeres): Also check
    	dead->data[category] != NULL.

diff --git a/ChangeLog b/ChangeLog
index 8d7a8b4..adeba92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* locale/loadarchive.c (_nl_archive_subfreeres): Also check
+	dead->data[category] != NULL.
+
 2015-08-05  Joseph Myers  <joseph@codesourcery.com>
 
 	[BZ #18647]
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index ce5c210..3e18cf0 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -515,7 +515,7 @@ _nl_archive_subfreeres (void)
 
       free (dead->name);
       for (category = 0; category < __LC_LAST; ++category)
-	if (category != LC_ALL)
+	if (category != LC_ALL && dead->data[category] != NULL)
 	  {
 	    /* _nl_unload_locale just does this free for the archive case.  */
 	    if (dead->data[category]->private.cleanup)

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

Summary of changes:
 ChangeLog            |    5 +++++
 locale/loadarchive.c |    2 +-
 2 files changed, 6 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]