File libidn-CVE-2016-6262.patch of Package libidn.2950

From 5e3cb9c7b5bf0ce665b9d68f5ddf095af5c9ba60 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@josefsson.org>
Date: Thu, 14 Jan 2016 13:59:19 +0000
Subject: Really fix bug when reading \00 inputs.

---
diff --git a/src/idn.c b/src/idn.c
index b40ed62..be1c7d1 100644
--- a/src/idn.c
+++ b/src/idn.c
@@ -200,8 +200,9 @@ main (int argc, char *argv[])
 	  error (EXIT_FAILURE, errno, _("input error"));
 	}
 
-      if (line[strlen (line) - 1] == '\n')
-	line[strlen (line) - 1] = '\0';
+      if (strlen (line) > 0)
+	if (line[strlen (line) - 1] == '\n')
+	  line[strlen (line) - 1] = '\0';
 
       if (args_info.stringprep_given)
 	{
--
cgit v0.9.0.2