GPG key exportation crash

Laurent Wacrenier <[email protected]> Thu, 22 Jul 2004 16:40:22 +0200
Newsgroups gmane.mail.sqwebmail
Message-ID <[email protected]>
Hi,

sqwebmaild 4.0.6 issue SIGBUS when trying to export a key as an
attachment.

Here is the one byte patch :

--- gpglib/export.c.orig	Thu Jul 22 16:34:40 2004
+++ gpglib/export.c	Thu Jul 22 16:34:52 2004
@@ -31,17 +31,17 @@
 
 int libmail_gpg_exportkey(const char *gpgdir,
 		  int secret,
 		  const char *fingerprint,
 		  int (*out_func)(const char *, size_t, void *),
 		  int (*err_func)(const char *, size_t, void *),
 		  void *voidarg)
 {
-	char *argvec[5];
+	char *argvec[6];
 	int rc;
 
 	argvec[0]="gpg";
 	argvec[1]="--armor";
 	argvec[2]="--no-tty";
 	argvec[3]= secret ? "--export-secret-keys":"--export";
 	argvec[4]=(char *)fingerprint;
 	argvec[5]=0;