Take patch backported to our version

This commit is contained in:
Thomas Crain 2021-02-11 21:57:59 -08:00
Родитель 2e9604aaeb
Коммит fa579fc877
1 изменённых файлов: 11 добавлений и 16 удалений

Просмотреть файл

@ -1,8 +1,9 @@
From 7d88c6142c6efc160c0ee5e4f85cde382c072888 Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer@redhat.com>
Date: Wed, 27 Jan 2021 13:36:12 +0100
Subject: [PATCH] gconv: Fix assertion failure in ISO-2022-JP-3 module (bug
27256)
Date: Wed, 27 Jan 2021 12:36:12 +0000 (+0100)
Subject: gconv: Fix assertion failure in ISO-2022-JP-3 module (bug 27256)
X-Git-Url: https://sourceware.org/git/?p=glibc.git;a=commitdiff_plain;h=e9db7768
gconv: Fix assertion failure in ISO-2022-JP-3 module (bug 27256)
The conversion loop to the internal encoding does not follow
the interface contract that __GCONV_FULL_OUTPUT is only returned
@ -19,27 +20,23 @@ which cannot be written immediately in the state variable, like
other converters already do (e.g., BIG5-HKSCS or TSCII).
Reported-by: Tavis Ormandy <taviso@gmail.com>
(cherry picked from commit 7d88c6142c6efc160c0ee5e4f85cde382c072888)
---
iconvdata/Makefile | 4 +-
iconvdata/bug-iconv14.c | 127 ++++++++++++++++++++++++++++++++++++++
iconvdata/iso-2022-jp-3.c | 67 ++++++++++++++------
3 files changed, 178 insertions(+), 20 deletions(-)
create mode 100644 iconvdata/bug-iconv14.c
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index c8c532a3e4..55c527a5f7 100644
index 06e161d9b8..36dd5d12c3 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -74,7 +74,7 @@ ifeq (yes,$(build-shared))
@@ -74,7 +74,7 @@ modules.so := $(addsuffix .so, $(modules))
tests = bug-iconv1 bug-iconv2 tst-loading tst-e2big tst-iconv4 bug-iconv4 \
tst-iconv6 bug-iconv5 bug-iconv6 tst-iconv7 bug-iconv8 bug-iconv9 \
bug-iconv10 bug-iconv11 bug-iconv12 tst-iconv-big5-hkscs-to-2ucs4 \
bug-iconv10 bug-iconv11 bug-iconv12 \
- bug-iconv13
+ bug-iconv13 bug-iconv14
ifeq ($(have-thread-library),yes)
tests += bug-iconv3
endif
@@ -322,6 +322,8 @@ $(objpfx)bug-iconv10.out: $(objpfx)gconv-modules \
@@ -316,6 +316,8 @@ $(objpfx)bug-iconv10.out: $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so))
$(objpfx)bug-iconv12.out: $(objpfx)gconv-modules \
$(addprefix $(objpfx),$(modules.so))
@ -182,7 +179,7 @@ index 0000000000..902f140fa9
+
+#include <support/test-driver.c>
diff --git a/iconvdata/iso-2022-jp-3.c b/iconvdata/iso-2022-jp-3.c
index 3eaa847ad9..c8ba88cdc9 100644
index de259580c3..047fab8e8d 100644
--- a/iconvdata/iso-2022-jp-3.c
+++ b/iconvdata/iso-2022-jp-3.c
@@ -67,23 +67,34 @@ enum
@ -287,5 +284,3 @@ index 3eaa847ad9..c8ba88cdc9 100644
} \
\
inptr += 2; \
--
2.27.0