-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77525 from thefloweringash/fixup-backport
glibc: fix cross compilation build failure (again)
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-findidxwc.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff -ur glibc-2.27/locale/weightwc.h glibc-2.27-patched/locale/weightwc.h | ||
--- glibc-2.27/locale/weightwc.h 2018-02-02 01:17:18.000000000 +0900 | ||
+++ glibc-2.27-patched/locale/weightwc.h 2020-01-12 04:54:16.044440602 +0900 | ||
@@ -94,19 +94,19 @@ | ||
if (cp[cnt] != usrc[cnt]) | ||
break; | ||
|
||
- if (cnt < nhere - 1) | ||
+ if (cnt < nhere - 1 || cnt == len) | ||
{ | ||
cp += 2 * nhere; | ||
continue; | ||
} | ||
|
||
- if (cp[nhere - 1] > usrc[nhere -1]) | ||
+ if (cp[nhere - 1] > usrc[nhere - 1]) | ||
{ | ||
cp += 2 * nhere; | ||
continue; | ||
} | ||
|
||
- if (cp[2 * nhere - 1] < usrc[nhere -1]) | ||
+ if (cp[2 * nhere - 1] < usrc[nhere - 1]) | ||
{ | ||
cp += 2 * nhere; | ||
continue; |
35 changes: 35 additions & 0 deletions
35
pkgs/development/libraries/glibc/fix-out-of-bounds-access-in-ibm-1390-converter.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 21526a507df8f1b2e37492193a754534d8938c0b Mon Sep 17 00:00:00 2001 | ||
From: Andreas Schwab <[email protected]> | ||
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 | ||
|