From 53567db1d52b53a7f454891fd0013bda06ab6fab Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Dec 2013 17:12:19 +0100 Subject: [PATCH] glibc: Apply upstream patch for scanf regression https://sourceware.org/bugzilla/show_bug.cgi?id=15917 This broke Atlas. http://hydra.nixos.org/build/7072399 http://sourceforge.net/p/math-atlas/discussion/75123/thread/dc45bb67/ --- .../libraries/glibc/2.18/common.nix | 2 ++ .../libraries/glibc/2.18/scanf.patch | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/development/libraries/glibc/2.18/scanf.patch diff --git a/pkgs/development/libraries/glibc/2.18/common.nix b/pkgs/development/libraries/glibc/2.18/common.nix index 0a1b32bbdb0..6692bd90ff9 100644 --- a/pkgs/development/libraries/glibc/2.18/common.nix +++ b/pkgs/development/libraries/glibc/2.18/common.nix @@ -54,6 +54,8 @@ stdenv.mkDerivation ({ src->results[i].native == a2_native' failed." crashes. */ ./glibc-rh739743.patch + ./scanf.patch + ./cve-2012-4412+4424.patch ./cve-2013-4237.patch ./cve-2013-4332.patch diff --git a/pkgs/development/libraries/glibc/2.18/scanf.patch b/pkgs/development/libraries/glibc/2.18/scanf.patch new file mode 100644 index 00000000000..4eed86ca110 --- /dev/null +++ b/pkgs/development/libraries/glibc/2.18/scanf.patch @@ -0,0 +1,21 @@ +https://sourceware.org/bugzilla/show_bug.cgi?id=15917 + +commit a4966c6104918ac884ee1131a4ed23c5ad6b4c5a +Author: Andreas Schwab +Date: Thu Oct 31 12:51:03 2013 +0100 + + Fix parsing of 0e+0 as float + +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)