core/glibc to 2.18-10

This commit is contained in:
Kevin Mihelich 2013-11-11 04:11:13 +00:00
parent ee424e13df
commit fcfbf7f672
2 changed files with 73 additions and 1 deletions

View file

@ -16,7 +16,7 @@ noautobuild=1
pkgname=glibc
pkgver=2.18
pkgrel=9
pkgrel=10
pkgdesc="GNU C Library"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/libc"
@ -34,6 +34,7 @@ source=(http://ftp.gnu.org/gnu/libc/${pkgname}-${pkgver}.tar.xz{,.sig}
glibc-2.18-readdir_r-CVE-2013-4237.patch
glibc-2.18-malloc-corrupt-CVE-2013-4332.patch
glibc-2.18-strcoll-CVE-2012-4412+4424.patch
glibc-2.18-scanf-parse-0e-0.patch
glibc-2.18-strstr-hackfix.patch
glibc-2.18-ptr-mangle-CVE-2013-4788.patch
glibc-2.18-getaddrinfo-CVE-2013-4458.patch
@ -53,6 +54,7 @@ md5sums=('88fbbceafee809e82efd52efa1e3c58f'
'9749ba386b08a8fe53e7ecede9bf2dfb'
'71329fccb8eb583fb0d67b55f1e8df68'
'd4d86add33f22125777e0ecff06bc9bb'
'01d19fe9b2aea489cf5651530e0369f2'
'4441f6dfe7d75ced1fa75e54dd21d36e'
'589d79041aa767a5179eaa4e2737dd3f'
'ad8a9af15ab7eeaa23dc7ee85024af9f'
@ -84,6 +86,9 @@ prepare() {
# upstream commit 894f3f10
patch -p1 -i $srcdir/glibc-2.18-getaddrinfo-assertion.patch
# upstream commit a4966c61
patch -p1 -i $srcdir/glibc-2.18-scanf-parse-0e-0.patch
# hack fix for strstr issues on x86
patch -p1 -i $srcdir/glibc-2.18-strstr-hackfix.patch

View file

@ -0,0 +1,67 @@
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)
--
1.8.4.2