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

r5891 - in glibc-package/branches/eglibc-2.18/debian: . patches patches/any



Author: aurel32
Date: 2013-12-23 20:21:35 +0000 (Mon, 23 Dec 2013)
New Revision: 5891

Added:
   glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-vfscanf-0e+0.diff
Modified:
   glibc-package/branches/eglibc-2.18/debian/changelog
   glibc-package/branches/eglibc-2.18/debian/patches/series
Log:
debian/patches/any/cvs-vfscanf-0e+0.diff: new patch from upstream to
fix parsing of 0e+0.  Closes: #732993.



Modified: glibc-package/branches/eglibc-2.18/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/changelog	2013-12-20 03:25:40 UTC (rev 5890)
+++ glibc-package/branches/eglibc-2.18/debian/changelog	2013-12-23 20:21:35 UTC (rev 5891)
@@ -1,5 +1,6 @@
 eglibc (2.18-0experimental1) UNRELEASED; urgency=low
 
+  [ Adam Conrad ]
   * debian/patches/i386/cvs-nonascii-case-strcmp.diff: Pull upstream patch
     to fix LC_CTYPE nonascii-case fallback in i686 strcasecmp/strncasecmp.
   * debian/testsuite-checking/*: Update 686 targets to match the 586 ones.
@@ -8,6 +9,10 @@
   * debian/patches/i386/cvs-sse42-strstr*: Backport upstream commits which
     drop buggy SSE4.2 srtstr implementations in favour of an SSE2 version.
 
+  [ Aurelien Jarno ]
+  * debian/patches/any/cvs-vfscanf-0e+0.diff: new patch from upstream to
+    fix parsing of 0e+0.  Closes: #732993.
+
  -- Adam Conrad <adconrad@ubuntu.com>  Tue, 10 Dec 2013 01:59:47 -0700
 
 eglibc (2.18-0experimental0) experimental; urgency=low

Added: glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-vfscanf-0e+0.diff
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-vfscanf-0e+0.diff	                        (rev 0)
+++ glibc-package/branches/eglibc-2.18/debian/patches/any/cvs-vfscanf-0e+0.diff	2013-12-23 20:21:35 UTC (rev 5891)
@@ -0,0 +1,71 @@
+2013-10-31  Andreas Schwab  <schwab@suse.de>
+
+	[BZ# 15917]
+	* stdio-common/vfscanf.c (_IO_vfwscanf): Handle leading '0' not
+	followed by 'x' as part of digit sequence.
+	* stdio-common/tst-sscanf.c (double_tests2): New tests.
+
+diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c
+index 1edb227..3c34f58 100644
+--- a/stdio-common/tst-sscanf.c
++++ b/stdio-common/tst-sscanf.c
+@@ -109,6 +109,19 @@ struct test double_tests[] =
+   { L("-inf"), L("%g"), 1 }
+ };
+ 
++struct test2
++{
++  const CHAR *str;
++  const CHAR *fmt;
++  int retval;
++  char residual;
++} double_tests2[] =
++{
++  { L("0e+0"), L("%g%c"), 1, 0 },
++  { L("0xe+0"), L("%g%c"), 2, '+' },
++  { L("0x.e+0"), L("%g%c"), 2, '+' },
++};
++
+ int
+ main (void)
+ {
+@@ -196,5 +209,26 @@ main (void)
+ 	}
+     }
+ 
++  for (i = 0; i < sizeof (double_tests2) / sizeof (double_tests2[0]); ++i)
++    {
++      double dummy;
++      int ret;
++      char c = 0;
++
++      if ((ret = SSCANF (double_tests2[i].str, double_tests2[i].fmt,
++			 &dummy, &c)) != double_tests2[i].retval)
++	{
++	  printf ("double_tests2[%d] returned %d != %d\n",
++		  i, ret, double_tests2[i].retval);
++	  result = 1;
++	}
++      else if (ret == 2 && c != double_tests2[i].residual)
++	{
++	  printf ("double_tests2[%d] stopped at '%c' != '%c'\n",
++		  i, c, double_tests2[i].residual);
++	  result = 1;
++	}
++    }
++
+   return result;
+ }
+diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
+index 78dc2fc..e6fa8f3 100644
+--- a/stdio-common/vfscanf.c
++++ b/stdio-common/vfscanf.c
+@@ -1966,6 +1966,8 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
+ 		  if (width > 0)
+ 		    --width;
+ 		}
++	      else
++		got_digit = 1;
+ 	    }
+ 
+ 	  while (1)

Modified: glibc-package/branches/eglibc-2.18/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.18/debian/patches/series	2013-12-20 03:25:40 UTC (rev 5890)
+++ glibc-package/branches/eglibc-2.18/debian/patches/series	2013-12-23 20:21:35 UTC (rev 5891)
@@ -263,3 +263,4 @@
 any/cvs-strcasecmp-locales.diff
 any/cvs-CVE-2013-4458-getaddrinfo.diff
 any/cvs-DL_CALL_DT_INIT_FINI.diff
+any/cvs-vfscanf-0e+0.diff


Reply to: