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

r2736 - in glibc-package/trunk/debian: . patches patches/any



Author: aurel32
Date: 2007-12-08 11:32:57 +0000 (Sat, 08 Dec 2007)
New Revision: 2736

Added:
   glibc-package/trunk/debian/patches/any/cvs-ether_line.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * patches/any/cvs-ether_line.diff: new patch from upstream to fix
    ether_line().  Closes: bug#453899.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2007-12-08 11:29:41 UTC (rev 2735)
+++ glibc-package/trunk/debian/changelog	2007-12-08 11:32:57 UTC (rev 2736)
@@ -3,8 +3,10 @@
   [ Aurelien Jarno ]
   * Moved merged parts of patches/any/submitted-sched_h.diff into
     patches/any/cvs-sched_h.diff.
+  * patches/any/cvs-ether_line.diff: new patch from upstream to fix
+    ether_line().  Closes: bug#453899.
 
- -- Aurelien Jarno <aurel32@debian.org>  Sat, 08 Dec 2007 12:29:28 +0100
+ -- Aurelien Jarno <aurel32@debian.org>  Sat, 08 Dec 2007 12:32:40 +0100
 
 glibc (2.7-4) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/any/cvs-ether_line.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-ether_line.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-ether_line.diff	2007-12-08 11:32:57 UTC (rev 2736)
@@ -0,0 +1,41 @@
+2007-12-07  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #5454]
+	* inet/ether_line.c: Strip hostname of whitespaces.
+
+Index: inet/ether_line.c
+===================================================================
+RCS file: /cvs/glibc/libc/inet/ether_line.c,v
+retrieving revision 1.6
+retrieving revision 1.7
+diff -u -d -p -r1.6 -r1.7
+--- inet/ether_line.c	24 May 2002 08:20:58 -0000	1.6
++++ inet/ether_line.c	7 Dec 2007 16:34:36 -0000	1.7
+@@ -61,19 +61,20 @@ ether_line (const char *line, struct eth
+ 	++line;
+     }
+ 
+-  /* Remove trailing white space.  */
+-  cp = __strchrnul (line, '#');
+-  while (cp > line && isspace (cp[-1]))
+-    --cp;
++  /* Skip initial whitespace.  */
++  while (isspace (*line))
++    ++line;
+ 
+-  if (cp == line)
++  if (*line == '#' || *line == '\0')
+     /* No hostname.  */
+     return -1;
+ 
++  /* The hostname is up to the next non-space character.  */
+   /* XXX This can cause trouble because the hostname might be too long
+      but we have no possibility to check it here.  */
+-  memcpy (hostname, line, cp - line);
+-  hostname [cp - line] = '\0';
++  while (*line != '\0' && *line != '#' && !isspace (*line))
++    *hostname++ = *line++;
++  *hostname = '\0';
+ 
+   return 0;
+ }

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2007-12-08 11:29:41 UTC (rev 2735)
+++ glibc-package/trunk/debian/patches/series	2007-12-08 11:32:57 UTC (rev 2736)
@@ -117,6 +117,7 @@
 all/local-remove-manual.diff
 all/local-ru_RU.diff 
 
+any/cvs-ether_line.diff -p0
 any/cvs-sched_h.diff -p0
 any/cvs-tzfile.diff -p1
 any/local-notls.diff -p0



Reply to: