aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/libidn/patches/14-fix-roundtrip-check.patch
blob: e762533e3114db90154dc4ec0a6f43e346327c1a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- contrib/libs/libidn/lib/idna.c
+++ contrib/libs/libidn/lib/idna.c
@@ -423,6 +423,12 @@ step3:
    * step 3, using a case-insensitive ASCII comparison.
    */

+  if (c_strncasecmp (tmpout, IDNA_ACE_PREFIX, STRLEN (IDNA_ACE_PREFIX)) != 0)
+    {
+      free (utf8in);
+      return IDNA_ROUNDTRIP_VERIFY_ERROR;
+    }
+
   if (c_strcasecmp (utf8in, tmpout + STRLEN (IDNA_ACE_PREFIX)) != 0)
     {
       free (utf8in);