Hello,
I have encountered $subject on s390(x)(seems to be affecting arm, AArch64,
ppc(64(le)) too) running Fedora. I did some digging and fixed problem in iri.c,
where char is assumed to be signed. In attachment is small git patch fixing
this issue(tests tried on all Fedora(21) arches(x86, arm, AArch64, s390(x),
ppc64(le)) using patched version 1.16, up mentioned tests pass successfully).
Best regards,
Jakub Čajka
From be5de412228e062e80867e491273b65133ff9a4f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <[email protected]>
Date: Mon, 3 Nov 2014 14:17:02 +0100
Subject: [PATCH] Fix char is assumed signed in iri.c Fixed idn-cmd-utf8 and
idn-robots-utf8 tests on archs with unsigned char
---
src/ChangeLog | 6 ++++++
src/iri.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 3cebf5b..5ad7605 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-03 Jakub Äajka <[email protected]>
+
+ * iri.c (remote_to_utf8): Fixed assumption that char is signed. Fixes
+ fellowing test case failures idn-cmd-utf8, idn-robots-utf8, if char is
+ unsigned.
+
2014-11-03 Tim Ruehsen <[email protected]>
* log.c: turn on automatic format check for log_vprintf_internal()
diff --git a/src/iri.c b/src/iri.c
index e38edc9..11f2bda 100644
--- a/src/iri.c
+++ b/src/iri.c
@@ -279,7 +279,7 @@ remote_to_utf8 (struct iri *iri, const char *str, const char **new)
{
const char *p = str;
for (p = str; *p; p++)
- if (*p < 0)
+ if (*p < 0 || *p > 127)
{
*new = strdup (str);
return true;
--
1.9.3