[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r2867 - in glibc-package/branches/glibc-branch-etch/debian: . patches patches/any



Author: aurel32
Date: 2008-03-11 20:16:25 +0000 (Tue, 11 Mar 2008)
New Revision: 2867

Added:
   glibc-package/branches/glibc-branch-etch/debian/patches/any/cvs-nscd-hstcache.diff
Modified:
   glibc-package/branches/glibc-branch-etch/debian/changelog
   glibc-package/branches/glibc-branch-etch/debian/patches/series
Log:
glibc (2.3.6.ds1-13etch6) stable; urgency=low
  * patches/any/cvs-nscd-hstcache.diff: first attempt to fix bug#467609.



Modified: glibc-package/branches/glibc-branch-etch/debian/changelog
===================================================================
--- glibc-package/branches/glibc-branch-etch/debian/changelog	2008-03-11 20:04:59 UTC (rev 2866)
+++ glibc-package/branches/glibc-branch-etch/debian/changelog	2008-03-11 20:16:25 UTC (rev 2867)
@@ -1,3 +1,9 @@
+glibc (2.3.6.ds1-13etch6) stable; urgency=low
+
+  * patches/any/cvs-nscd-hstcache.diff: first attempt to fix bug#467609.
+
+ -- Aurelien Jarno <aurel32@debian.org>  Tue, 11 Mar 2008 21:16:02 +0100
+
 glibc (2.3.6.ds1-13etch5) stable; urgency=low
 
   * patches/any/cvs-sunrpc_rpc_thread.diff: patch by André Cruz to fix

Added: glibc-package/branches/glibc-branch-etch/debian/patches/any/cvs-nscd-hstcache.diff
===================================================================
--- glibc-package/branches/glibc-branch-etch/debian/patches/any/cvs-nscd-hstcache.diff	                        (rev 0)
+++ glibc-package/branches/glibc-branch-etch/debian/patches/any/cvs-nscd-hstcache.diff	2008-03-11 20:16:25 UTC (rev 2867)
@@ -0,0 +1,59 @@
+2007-08-21  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #4905]
+	* nscd/hstcache.c (cache_addhst): When reloading an entry which
+	suddenly has two or more addresses, ignore it and remove the old
+	entry.
+
+===================================================================
+RCS file: /cvs/glibc/libc/nscd/hstcache.c,v
+retrieving revision 1.43
+retrieving revision 1.44
+diff -u -r1.43 -r1.44
+--- libc/nscd/hstcache.c	2007/08/22 03:11:23	1.43
++++ libc/nscd/hstcache.c	2007/08/22 03:29:46	1.44
+@@ -295,25 +295,30 @@
+ 	      /* The data has not changed.  We will just bump the
+ 		 timeout value.  Note that the new record has been
+ 		 allocated on the stack and need not be freed.  */
++	      assert (h_addr_list_cnt == 1);
+ 	      dh->timeout = dataset->head.timeout;
+ 	      ++dh->nreloads;
+ 	    }
+ 	  else
+ 	    {
+-	      /* We have to create a new record.  Just allocate
+-		 appropriate memory and copy it.  */
+-	      struct dataset *newp
+-		= (struct dataset *) mempool_alloc (db, total + req->key_len);
+-	      if (newp != NULL)
+-		{
+-		  /* Adjust pointers into the memory block.  */
+-		  addresses = (char *) newp + (addresses - (char *) dataset);
+-		  aliases = (char *) newp + (aliases - (char *) dataset);
+-		  if (key_copy != NULL)
+-		    key_copy = (char *) newp + (key_copy - (char *) dataset);
+-
+-		  dataset = memcpy (newp, dataset, total + req->key_len);
+-		  alloca_used = false;
++	      if (h_addr_list_cnt == 1)
++	        {
++		/* We have to create a new record.  Just allocate
++		   appropriate memory and copy it.  */
++		  struct dataset *newp
++		    = (struct dataset *) mempool_alloc (db,
++				  			total + req->key_len);
++		  if (newp != NULL)
++		    {
++		      /* Adjust pointers into the memory block.  */
++		      addresses = (char *) newp + (addresses - (char *) dataset);
++		      aliases = (char *) newp + (aliases - (char *) dataset);
++		      if (key_copy != NULL)
++		        key_copy = (char *) newp + (key_copy - (char *) dataset);
++
++		      dataset = memcpy (newp, dataset, total + req->key_len);
++		      alloca_used = false;
++		    }
+ 		}
+ 
+ 	      /* Mark the old record as obsolete.  */

Modified: glibc-package/branches/glibc-branch-etch/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-branch-etch/debian/patches/series	2008-03-11 20:04:59 UTC (rev 2866)
+++ glibc-package/branches/glibc-branch-etch/debian/patches/series	2008-03-11 20:16:25 UTC (rev 2867)
@@ -191,6 +191,7 @@
 any/cvs-sunrpc-xdrmem_setpos.diff
 any/cvs-getent-wrong-struct-size.diff -p0
 any/cvs-nscd-free.diff -p1
+any/cvs-nscd-hstcache.diff -p1
 any/cvs-sunrpc-64bits-svc_getreqset.diff -p0
 any/cvs-vfprintf-stack-smashing.diff
 any/cvs-getnetgrent_r-memory-leak.diff


Reply to: