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.14-35-g51f9aa6


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  51f9aa6a1ed763cb133fff2efddfbf564a82a528 (commit)
      from  c0244a9dedce43a4b950d91451b16a7cf5408476 (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51f9aa6a1ed763cb133fff2efddfbf564a82a528

commit 51f9aa6a1ed763cb133fff2efddfbf564a82a528
Author: Ulrich Drepper <drepper@gmail.com>
Date:   Tue Jun 21 17:09:44 2011 -0400

    Fix crash in unsuccessful uses of nss_db

diff --git a/ChangeLog b/ChangeLog
index abc4894..5dc235e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-06-21  Ulrich Drepper  <drepper@gmail.com>
 
+	* nss/nss_db/db-XXX.c (nss_db_setENT): Only set entidx for successful
+	calls to internal_setent.
+
 	[BZ #12885]
 	* sysdeps/posix/getaddrinfo.c (gaih_inet): When looking up only IPv6
 	addresses using gethostbyname4_r ignore IPv4 addresses.
diff --git a/nss/nss_db/db-XXX.c b/nss/nss_db/db-XXX.c
index 3947893..0600e38 100644
--- a/nss/nss_db/db-XXX.c
+++ b/nss/nss_db/db-XXX.c
@@ -71,11 +71,14 @@ CONCAT(_nss_db_set,ENTNAME) (int stayopen)
 
   status = internal_setent (DBFILE, &state);
 
-  /* Remember STAYOPEN flag.  */
   if (status == NSS_STATUS_SUCCESS)
-    keep_db |= stayopen;
-  /* Reset the sequential index.  */
-  entidx  = (const char *) state.header + state.header->valstroffset;
+    {
+      /* Remember STAYOPEN flag.  */
+      keep_db |= stayopen;
+
+      /* Reset the sequential index.  */
+      entidx  = (const char *) state.header + state.header->valstroffset;
+    }
 
   __libc_lock_unlock (lock);
 

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

Summary of changes:
 ChangeLog           |    3 +++
 nss/nss_db/db-XXX.c |   11 +++++++----
 2 files changed, 10 insertions(+), 4 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]