GnuPG 2.0.10 - t-convert test fails on ppc and s390

Werner Koch wk at gnupg.org
Mon Jan 19 14:00:43 CET 2009


Hi,

Can you please test this patch:

2009-01-19  Werner Koch  <wk at g10code.com>

	* convert.c (hex2str): Fix optimization to append a nul character.

Index: common/convert.c
===================================================================
--- common/convert.c    (revision 4915)
+++ common/convert.c    (working copy)
@@ -194,7 +194,9 @@
     ;
   if (*s && (!isascii (*s) || !isspace (*s)) )
     return NULL;   /* Not followed by Nul or white space.  */
-  need_nul = !(s[-2] == '0' && s[-1] == '0');
+  /* We need to append a nul character.  However we don't want that if
+     the hexstring already ends with "00".  */
+  need_nul = ((s == hexstring) || !(s[-2] == '0' && s[-1] == '0'));
   if (need_nul)
     count++;
 

-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




More information about the Gnupg-users mailing list