diff --git a/Implement-full-roundtrip-for-lookup-functionality.patch b/Implement-full-roundtrip-for-lookup-functionality.patch deleted file mode 100644 index ffcdfbe0f1d59a71af441a328a80bb968cecd6c3..0000000000000000000000000000000000000000 --- a/Implement-full-roundtrip-for-lookup-functionality.patch +++ /dev/null @@ -1,122 +0,0 @@ -From c7b33a418d9426ee311db45473cb20bad94df26a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Tim=20R=C3=BChsen?= -Date: Mon, 10 Feb 2020 15:10:54 +0100 -Subject: [PATCH] Implement full roundtrip for lookup functionality -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -With TR64 enabled (default), '☺i' was converted to 'xn-- o-oia59s'. -The output contains an illegal space and thus could not be decoded any more. - -References: -https://gitlab.com/libidn/libidn2/issues/78 -https://gitlab.isc.org/isc-projects/bind9/issues/1610 - -Reported-by: Chris Malton ---- - lib/lookup.c | 33 +++++++++++++++++++++++---------- - tests/test-lookup.c | 5 +++++ - 3 files changed, 29 insertions(+), 10 deletions(-) - -diff --git a/lib/lookup.c b/lib/lookup.c -index a55f82b..5e5ff12 100644 ---- a/lib/lookup.c -+++ b/lib/lookup.c -@@ -1,5 +1,6 @@ - /* lookup.c - implementation of IDNA2008 lookup functions - Copyright (C) 2011-2017 Simon Josefsson -+ Copyright (C) 2017-2020 Tim Ruehsen - - Libidn2 is free software: you can redistribute it and/or modify it - under the terms of either: -@@ -123,7 +124,7 @@ label (const uint8_t * src, size_t srclen, uint8_t * dst, size_t * dstlen, - int flags) - { - size_t plen; -- uint32_t *p; -+ uint32_t *p = NULL; - const uint8_t *src_org = NULL; - uint8_t *src_allocated = NULL; - int rc, check_roundtrip = 0; -@@ -187,10 +188,7 @@ label (const uint8_t * src, size_t srclen, uint8_t * dst, size_t * dstlen, - p, plen); - - if (rc != IDN2_OK) -- { -- free (p); -- goto out; -- } -+ goto out; - } - - dst[0] = 'x'; -@@ -200,7 +198,6 @@ label (const uint8_t * src, size_t srclen, uint8_t * dst, size_t * dstlen, - - tmpl = *dstlen - 4; - rc = _idn2_punycode_encode_internal (plen, p, &tmpl, (char *) dst + 4); -- free (p); - if (rc != IDN2_OK) - goto out; - -@@ -210,15 +207,31 @@ label (const uint8_t * src, size_t srclen, uint8_t * dst, size_t * dstlen, - if (check_roundtrip) - { - if (srclen_org != *dstlen || c_strncasecmp ((char *) src_org, (char *) dst, srclen_org)) -- { -- rc = IDN2_ALABEL_ROUNDTRIP_FAILED; -- goto out; -- } -+ { -+ rc = IDN2_ALABEL_ROUNDTRIP_FAILED; -+ goto out; -+ } -+ } -+ else if (!(flags & IDN2_NO_ALABEL_ROUNDTRIP)) -+ { -+ rc = _idn2_punycode_decode_internal (*dstlen - 4, (char *) dst + 4, &label32_len, label_u32); -+ if (rc) -+ { -+ rc = IDN2_ALABEL_ROUNDTRIP_FAILED; -+ goto out; -+ } -+ -+ if (plen != label32_len || u32_cmp (p, label_u32, label32_len)) -+ { -+ rc = IDN2_ALABEL_ROUNDTRIP_FAILED; -+ goto out; -+ } - } - - rc = IDN2_OK; - - out: -+ free (p); - free (src_allocated); - return rc; - } -diff --git a/tests/test-lookup.c b/tests/test-lookup.c -index aa75e18..2b49cb1 100644 ---- a/tests/test-lookup.c -+++ b/tests/test-lookup.c -@@ -1,5 +1,6 @@ - /* test-lookup.c --- Self tests for IDNA processing - Copyright (C) 2011-2017 Simon Josefsson -+ Copyright (C) 2017-2020 Tim Ruehsen - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by -@@ -838,6 +839,10 @@ static const struct idna idna[] = { - {"\xc3\xa4_x", "xn--_x-uia", IDN2_OK, IDN2_TRANSITIONAL}, - /* failing lookup round-trip */ - {"xn--te_", "", IDN2_ALABEL_ROUNDTRIP_FAILED}, -+ /* failing lookup round-trip: ☺ -> xn-- o-oia59s (illegal space in output, see https://gitlab.com/libidn/libidn2/issues/78) */ -+ {"\xc3\xa2\xcb\x9c\xc2\xba", "", IDN2_DISALLOWED, IDN2_NO_TR46}, -+ {"\xc3\xa2\xcb\x9c\xc2\xba", "", IDN2_ALABEL_ROUNDTRIP_FAILED, IDN2_TRANSITIONAL}, -+ {"\xc3\xa2\xcb\x9c\xc2\xba", "", IDN2_ALABEL_ROUNDTRIP_FAILED, IDN2_NONTRANSITIONAL}, - }; - - static int ok = 0, failed = 0; --- -1.8.3.1 - diff --git a/libidn2-2.3.0.tar.gz.sig b/libidn2-2.3.0.tar.gz.sig deleted file mode 100644 index 0c8381888f28a80b28a8eb334d177d0f2abef2a4..0000000000000000000000000000000000000000 Binary files a/libidn2-2.3.0.tar.gz.sig and /dev/null differ diff --git a/libidn2-2.3.0.tar.gz b/libidn2-2.3.2.tar.gz similarity index 31% rename from libidn2-2.3.0.tar.gz rename to libidn2-2.3.2.tar.gz index d3ce0a36fda016976867d0c41e1ee2e0f8b9d3cf..aef132a7c74a8c35d5e45cf9da509c6df2543c4f 100644 Binary files a/libidn2-2.3.0.tar.gz and b/libidn2-2.3.2.tar.gz differ diff --git a/libidn2-2.3.2.tar.gz.sig b/libidn2-2.3.2.tar.gz.sig new file mode 100644 index 0000000000000000000000000000000000000000..479c8a5cfa04bb4a15eb792123444e7143e5cc89 --- /dev/null +++ b/libidn2-2.3.2.tar.gz.sig @@ -0,0 +1,11 @@ +-----BEGIN PGP SIGNATURE----- + +iQEzBAABCgAdFiEEmUFc4ZBdDlWp+IAmhgt/uzL4EZ0FAmD2beoACgkQhgt/uzL4 +EZ3SoQgAjHr7DKeZVqc/l6B2Hko8gIRhmdxmw91NAg1FYHMoRFXQDh0sKXctrD8p +7Is+5cBRUFmBcHgsnauriuKZ67/73O+xLq6LOPh/Xe+ndknD9WlYhEI2CE8T1d6k +V+c/GY/JOMqFB7f1p6ihmN2lvdaACKNTZq7AjzAiP6JieM3A9zNPkYd+HuBU43wu +cTDRE/GulAl1u32mxiBLL/ZOFBcpuf5wAZilr4C2mUdyINjPPPgwiKd0Y64VH/6f +HFLwXBb8Tfy1ByBaHkzrpxij1uqiMbDP3Puv75uFeR1sAUhFqptv71UhBvTx4Pzs +1aLMsJe7VTxWsR/gz98FtXMTimKn7A== +=r+l8 +-----END PGP SIGNATURE----- diff --git a/libidn2.spec b/libidn2.spec index ffbf724c8b8148ccff669129e522d343a77a20c5..7cbd63770e87a4f02c25d2c190b37ab92253a261 100644 --- a/libidn2.spec +++ b/libidn2.spec @@ -1,5 +1,5 @@ Name: libidn2 -Version: 2.3.0 +Version: 2.3.2 Release: 1 Summary: GNU IDN Library License: (GPLv2+ or LGPLv3+) and GPLv3+ @@ -7,7 +7,6 @@ URL: https://www.gnu.org/software/libidn/#libidn2 Source0: https://ftp.gnu.org/gnu/libidn/%{name}-%{version}.tar.gz Patch0: bugfix-libidn2-change-rpath.patch -Patch1: Implement-full-roundtrip-for-lookup-functionality.patch #Dependency BuildRequires: gcc gettext libunistring-devel autoconf texinfo automake @@ -37,6 +36,7 @@ Files for %{name} development autoreconf %configure --disable-static %make_build +%make_build -C doc html %install %make_install @@ -75,6 +75,12 @@ make %{?_smp_mflags} -C tests check %{_datadir}/gtk-doc/ %changelog +* Wed Dec 1 2021 wangchen - 2.3.2-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update to 2.3.2 + * Thu Jul 23 2020 zhangxingliang - 2.3.0-1 - Type:update - ID:NA