diff options
author | Andrew Childs <lorne@cons.org.nz> | 2020-01-12 06:17:34 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2020-01-12 07:08:19 +0900 |
commit | b5a45106ae351e5332abd96605560aa91e8c8679 (patch) | |
tree | 77cd9ec5841bfc591cf10de80a6f76e97866f675 /pkgs/development/libraries/glibc | |
parent | 22a8e7f13dc00688b0516d3b67fa3b38d45a9be6 (diff) |
glibc: backport fix for out of bounds access in IBM-1390 converter
Diffstat (limited to 'pkgs/development/libraries/glibc')
-rw-r--r-- | pkgs/development/libraries/glibc/common.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch | 35 |
2 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 690afc9971dc4..458745694bcc0 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -102,6 +102,10 @@ stdenv.mkDerivation ({ # Change backported from upstream # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9c79cec8cd2a6996a73aa83d79b360ffd4bebde6 ./fix-out-of-bounds-access-in-findidxwc.patch + + # Remove after upgrading to glibc 2.28+ + # https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=21526a507df8f1b2e37492193a754534d8938c0b + ./fix-out-of-bounds-access-in-ibm-1390-converter.patch ] ++ lib.optionals stdenv.isx86_64 [ ./fix-x64-abi.patch diff --git a/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch new file mode 100644 index 0000000000000..8b560566a4918 --- /dev/null +++ b/pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch @@ -0,0 +1,35 @@ +From 21526a507df8f1b2e37492193a754534d8938c0b Mon Sep 17 00:00:00 2001 +From: Andreas Schwab <schwab@suse.de> +Date: Tue, 24 Jul 2018 14:08:34 +0200 +Subject: [PATCH] Fix out-of-bounds access in IBM-1390 converter (bug 23448) + +The IBM-1390 converter can consume/produce two UCS4 characters in each +loop. +--- + ChangeLog | 6 ++++++ + iconvdata/ibm1364.c | 2 ++ + 2 files changed, 8 insertions(+) + +diff --git a/iconvdata/ibm1364.c b/iconvdata/ibm1364.c +index b833273..517fe60 100644 +--- a/iconvdata/ibm1364.c ++++ b/iconvdata/ibm1364.c +@@ -150,6 +150,7 @@ enum + #define MIN_NEEDED_INPUT MIN_NEEDED_FROM + #define MAX_NEEDED_INPUT MAX_NEEDED_FROM + #define MIN_NEEDED_OUTPUT MIN_NEEDED_TO ++#define MAX_NEEDED_OUTPUT MAX_NEEDED_TO + #define LOOPFCT FROM_LOOP + #define BODY \ + { \ +@@ -296,6 +297,7 @@ enum + + /* Next, define the other direction. */ + #define MIN_NEEDED_INPUT MIN_NEEDED_TO ++#define MAX_NEEDED_INPUT MAX_NEEDED_TO + #define MIN_NEEDED_OUTPUT MIN_NEEDED_FROM + #define MAX_NEEDED_OUTPUT MAX_NEEDED_FROM + #define LOOPFCT TO_LOOP +-- +2.9.3 + |