aboutsummaryrefslogtreecommitdiff
path: root/iconvdata
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2018-07-24 14:08:34 +0200
committerAndreas Schwab <schwab@suse.de>2018-07-24 16:45:46 +0200
commit21526a507df8f1b2e37492193a754534d8938c0b (patch)
tree671add0112e2ece06dbfb8dab75dfc25b7e157b1 /iconvdata
parent3650e1d9284926be67e368707a9a2276fb77a167 (diff)
downloadglibc-21526a507df8f1b2e37492193a754534d8938c0b.zip
glibc-21526a507df8f1b2e37492193a754534d8938c0b.tar.gz
glibc-21526a507df8f1b2e37492193a754534d8938c0b.tar.bz2
Fix out-of-bounds access in IBM-1390 converter (bug 23448)
The IBM-1390 converter can consume/produce two UCS4 characters in each loop.
Diffstat (limited to 'iconvdata')
-rw-r--r--iconvdata/ibm1364.c2
1 files changed, 2 insertions, 0 deletions
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