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.10-380-gc240c3a


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  c240c3a58f21d72982e74a485bd7c4900f188876 (commit)
      from  1a9e411e2aba14573ddc2ced4a5ee927a01031e0 (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=c240c3a58f21d72982e74a485bd7c4900f188876

commit c240c3a58f21d72982e74a485bd7c4900f188876
Author: Joe Landers <jlanders@vmware.com>
Date:   Thu Oct 29 19:59:59 2009 -0700

    Fix error handling in NIS.
    
    A buffer was freed even though it wasn't allocated as expected.  Do
    this only when !batch_read.

diff --git a/ChangeLog b/ChangeLog
index 81defae..d2089f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2009-10-29  Ulrich Drepper  <drepper@redhat.com>
 
+	[BZ #10692]
+	* nis/nss_nis/nis-grp.c (internal_nis_getgrent_r): Don't free buffer
+	in error if batch_read.  Patch by Joe Landers <jlanders@vmware.com>.
+
 	[BZ #10713]
 	* nis/nss_nis/nis-grp.c (internal_nis_endgrent): Start freeing blocks
 	from intern.start.  Patch by Joe Landers <jlanders@vmware.com>.
diff --git a/nis/nss_nis/nis-grp.c b/nis/nss_nis/nis-grp.c
index 071d8a2..6ad30eb 100644
--- a/nis/nss_nis/nis-grp.c
+++ b/nis/nss_nis/nis-grp.c
@@ -204,7 +204,8 @@ internal_nis_getgrent_r (struct group *grp, char *buffer, size_t buflen,
 
       if (__builtin_expect ((size_t) (len + 1) > buflen, 0))
 	{
-	  free (result);
+	  if (!batch_read)
+	    free (result);
 	  *errnop = ERANGE;
 	  return NSS_STATUS_TRYAGAIN;
 	}

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

Summary of changes:
 ChangeLog             |    4 ++++
 nis/nss_nis/nis-grp.c |    3 ++-
 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]