r2316 - in glibc-package/branches/glibc-2.6/debian: . patches patches/any
Author: aurel32
Date: 2007-05-30 12:51:13 +0000 (Wed, 30 May 2007)
New Revision: 2316
Added:
glibc-package/branches/glibc-2.6/debian/patches/any/cvs-nscd-short-replies.diff
Modified:
glibc-package/branches/glibc-2.6/debian/changelog
glibc-package/branches/glibc-2.6/debian/patches/series
Log:
* any/cvs-nscd-short-replies.diff: new patch from CVS to fix crash on
short replies.
Modified: glibc-package/branches/glibc-2.6/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.6/debian/changelog 2007-05-30 12:43:38 UTC (rev 2315)
+++ glibc-package/branches/glibc-2.6/debian/changelog 2007-05-30 12:51:13 UTC (rev 2316)
@@ -91,6 +91,8 @@
* any/submitted-strtok.diff: new patch to fix a typo in strings/strtok.c.
Closes: #426118.
* debian/sysdeps/depflags.pl: depends on libgcc1/libgcc2/libgcc4.
+ * any/cvs-nscd-short-replies.diff: new patch from CVS to fix crash on
+ short replies.
[ Clint Adams ]
* debian/local/manpages/ld.so.8: quote accepted values for LD_DEBUG.
@@ -98,7 +100,7 @@
* New Malayalam debconf translation, by Sajeev പിആര്. closes:
#426203.
- -- Aurelien Jarno <aurel32@debian.org> Wed, 30 May 2007 13:40:55 +0200
+ -- Aurelien Jarno <aurel32@debian.org> Wed, 30 May 2007 14:42:41 +0200
glibc (2.5-9) unstable; urgency=low
Added: glibc-package/branches/glibc-2.6/debian/patches/any/cvs-nscd-short-replies.diff
===================================================================
--- glibc-package/branches/glibc-2.6/debian/patches/any/cvs-nscd-short-replies.diff (rev 0)
+++ glibc-package/branches/glibc-2.6/debian/patches/any/cvs-nscd-short-replies.diff 2007-05-30 12:51:13 UTC (rev 2316)
@@ -0,0 +1,32 @@
+2007-05-29 Ulrich Drepper <drepper@redhat.com>
+
+ * nscd/nscd_helper.c (get_mapping): Handle short replies instead
+ of crashing. When this is the case or if the reply is malformed,
+ don't try to close the new file descriptor since it does not
+ exist.
+ Patch in part by Guillaume Chazarain <guichaz@yahoo.fr>.
+
+===================================================================
+RCS file: /cvs/glibc/libc/nscd/nscd_helper.c,v
+retrieving revision 1.22
+retrieving revision 1.24
+diff -u -r1.22 -r1.24
+--- libc/nscd/nscd_helper.c 2007/02/16 06:34:19 1.22
++++ libc/nscd/nscd_helper.c 2007/05/29 15:04:02 1.24
+@@ -269,11 +269,12 @@
+ != keylen, 0))
+ goto out_close2;
+
+- mapfd = *(int *) CMSG_DATA (cmsg);
++ if (__builtin_expect (CMSG_FIRSTHDR (&msg) == NULL
++ || (CMSG_FIRSTHDR (&msg)->cmsg_len
++ != CMSG_LEN (sizeof (int))), 0))
++ goto out_close2;
+
+- if (__builtin_expect (CMSG_FIRSTHDR (&msg)->cmsg_len
+- != CMSG_LEN (sizeof (int)), 0))
+- goto out_close;
++ mapfd = *(int *) CMSG_DATA (cmsg);
+
+ struct stat64 st;
+ if (__builtin_expect (strcmp (resdata, key) != 0, 0)
Modified: glibc-package/branches/glibc-2.6/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.6/debian/patches/series 2007-05-30 12:43:38 UTC (rev 2315)
+++ glibc-package/branches/glibc-2.6/debian/patches/series 2007-05-30 12:51:13 UTC (rev 2316)
@@ -91,6 +91,7 @@
all/local-pt_BR.diff
any/cvs-malloc.diff -p1
+any/cvs-nscd-short-replies.diff -p1
any/local-notls.diff -p0
any/local-asserth-decls.diff -p0
# any/local-base.diff -p0 # g: suspended
Reply to: