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

[commits] r10360 - in /fsf/trunk/libc: ChangeLog misc/mntent_r.c



Author: eglibc
Date: Mon May  3 00:03:48 2010
New Revision: 10360

Log:
Import glibc-mainline for 2010-05-03

Modified:
    fsf/trunk/libc/ChangeLog
    fsf/trunk/libc/misc/mntent_r.c

Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon May  3 00:03:48 2010
@@ -1,3 +1,9 @@
+2010-05-02  Ulrich Drepper  <drepper@xxxxxxxxxx>
+
+	* misc/mntent_r.c (encode_name): The slow loop handles newlines so we
+	should recognize them as an abort condition.
+	Patch by Jan Lieskovsky <jlieskov@xxxxxxxxxx>.
+
 2010-04-25  Bruno Haible  <bruno@xxxxxxxxx>
 
 	[BZ #11538]

Modified: fsf/trunk/libc/misc/mntent_r.c
==============================================================================
--- fsf/trunk/libc/misc/mntent_r.c (original)
+++ fsf/trunk/libc/misc/mntent_r.c Mon May  3 00:03:48 2010
@@ -1,5 +1,5 @@
 /* Utilities for reading/writing fstab, mtab, etc.
-   Copyright (C) 1995-2000, 2001, 2002, 2003, 2006
+   Copyright (C) 1995-2000, 2001, 2002, 2003, 2006, 2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -194,7 +194,7 @@
     const char *rp = name;						      \
 									      \
     while (*rp != '\0')							      \
-      if (*rp == ' ' || *rp == '\t' || *rp == '\\')			      \
+      if (*rp == ' ' || *rp == '\t' || *rp == '\n' || *rp == '\\')	      \
 	break;								      \
       else								      \
 	++rp;								      \
@@ -202,7 +202,7 @@
     if (*rp != '\0')							      \
       {									      \
 	/* In the worst case the length of the string can increase to	      \
-	   founr times the current length.  */				      \
+	   four times the current length.  */				      \
 	char *wp;							      \
 									      \
 	rp = name;							      \