$OpenBSD: patch-lib_idna_c,v 1.1 2016/07/22 12:27:42 sthen Exp $

Backport security fixes from libidn 1.33
https://lists.gnu.org/archive/html/help-libidn/2016-07/msg00009.html

--- lib/idna.c.orig	Sat Aug  1 14:07:20 2015
+++ lib/idna.c	Thu Jul 21 17:08:52 2016
@@ -212,6 +212,11 @@ step3:
       }
     if (i < 64)
       out[i] = '\0';
+    else
+      {
+	free (src);
+	return IDNA_INVALID_LENGTH;
+      }
     if (inasciirange)
       goto step8;
   }
@@ -266,7 +271,7 @@ step3:
 
 step8:
   free (src);
-  if (strlen (out) < 1 || strlen (out) > 63)
+  if (strlen (out) < 1)
     return IDNA_INVALID_LENGTH;
 
   return IDNA_SUCCESS;
