aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2009-08-18 10:16:07 +0000
committerWerner Koch <[email protected]>2009-08-18 10:16:07 +0000
commitf52ef6d4505ade1f168868638bc804732b909b0c (patch)
treeff617d279bbed7fe34215ec88cdd8786d74a3399
parentFix two bugs (diff)
downloadgnupg-f52ef6d4505ade1f168868638bc804732b909b0c.tar.gz
gnupg-f52ef6d4505ade1f168868638bc804732b909b0c.zip
* miscutil.c (print_string2): Loose check for control characters
to better cope with utf-8. The range 0x80..0x9f is nowadays not anymore accidently used for control charaters. Fixes bug#1103.
-rw-r--r--util/ChangeLog6
-rw-r--r--util/miscutil.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index dcb21678c..1ae5ac57d 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,9 @@
+2009-08-18 Werner Koch <[email protected]>
+
+ * miscutil.c (print_string2): Loose check for control characters
+ to better cope with utf-8. The range 0x80..0x9f is nowadays not
+ anymore accidently used for control charaters. Fixes bug#1103.
+
2009-08-11 David Shaw <[email protected]>
* strgutil.c (string_to_utf8): New function to convert a Latin-1
diff --git a/util/miscutil.c b/util/miscutil.c
index 14fdc79c0..f74d3e38b 100644
--- a/util/miscutil.c
+++ b/util/miscutil.c
@@ -256,7 +256,8 @@ void
print_string2( FILE *fp, const byte *p, size_t n, int delim, int delim2 )
{
for( ; n; n--, p++ )
- if( *p < 0x20 || (*p >= 0x7f && *p < 0xa0)
+ if (*p < 0x20
+ || *p == 0x7f
|| *p == delim || *p == delim2
|| ((delim || delim2) && *p=='\\'))
{