File 0501-unicode_util-did-not-handle-binary-input-data-correc.patch of Package erlang

From d00c1adf7e12f791781995c9469a1acf94ddfb93 Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson <dgud@erlang.org>
Date: Mon, 19 Nov 2018 13:44:12 +0100
Subject: [PATCH] unicode_util did not handle binary input data correctly

gc_zwj sent binaries recursivly to gc_extend/3 which didn't handle
can't handle them.

ERL-777
---
 lib/stdlib/test/unicode_util_SUITE.erl     | 27 ++++++++++++++++++++-------
 lib/stdlib/uc_spec/gen_unicode_mod.escript |  2 +-
 2 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/lib/stdlib/uc_spec/gen_unicode_mod.escript b/lib/stdlib/uc_spec/gen_unicode_mod.escript
index fe5a860d45..535f01a1c5 100755
--- a/lib/stdlib/uc_spec/gen_unicode_mod.escript
+++ b/lib/stdlib/uc_spec/gen_unicode_mod.escript
@@ -646,7 +646,7 @@ gen_gc(Fd, GBP) ->
     io:put_chars(Fd, "is_emodifier(_) -> false.\n\n"),
 
     io:put_chars(Fd, "gc_zwj(R0, Acc) ->\n    case cp(R0) of\n"),
-    GenZWJGlue = fun(Range) -> io:format(Fd, "~8c~s gc_extend(R1, R0, [CP|Acc]);\n",
+    GenZWJGlue = fun(Range) -> io:format(Fd, "~8c~s gc_extend(cp(R1), R0, [CP|Acc]);\n",
                                          [$\s,gen_case_clause(Range)]) end,
     [GenZWJGlue(CP) || CP <- merge_ranges(maps:get(glue_after_zwj,GBP))],
     GenZWJEBG = fun(Range) -> io:format(Fd, "~8c~s gc_e_cont(R1, [CP|Acc]);\n",
-- 
2.16.4