[svn] GnuPG - r5123 - branches/STABLE-BRANCH-1-4/util

svn author wk cvs at cvs.gnupg.org
Tue Aug 18 12:16:08 CEST 2009


Author: wk
Date: 2009-08-18 12:16:07 +0200 (Tue, 18 Aug 2009)
New Revision: 5123

Modified:
   branches/STABLE-BRANCH-1-4/util/ChangeLog
   branches/STABLE-BRANCH-1-4/util/miscutil.c
Log:
* 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.


Modified: branches/STABLE-BRANCH-1-4/util/ChangeLog
===================================================================
--- branches/STABLE-BRANCH-1-4/util/ChangeLog	2009-08-18 09:54:00 UTC (rev 5122)
+++ branches/STABLE-BRANCH-1-4/util/ChangeLog	2009-08-18 10:16:07 UTC (rev 5123)
@@ -1,3 +1,9 @@
+2009-08-18  Werner Koch  <wk at g10code.com>
+
+	* 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  <dshaw at jabberwocky.com>
 
 	* strgutil.c (string_to_utf8): New function to convert a Latin-1

Modified: branches/STABLE-BRANCH-1-4/util/miscutil.c
===================================================================
--- branches/STABLE-BRANCH-1-4/util/miscutil.c	2009-08-18 09:54:00 UTC (rev 5122)
+++ branches/STABLE-BRANCH-1-4/util/miscutil.c	2009-08-18 10:16:07 UTC (rev 5123)
@@ -256,7 +256,8 @@
 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=='\\'))
 	  {




More information about the Gnupg-commits mailing list