possible bug with --batch and 1.4.2

David Shaw dshaw at jabberwocky.com
Thu Aug 4 15:07:24 CEST 2005


On Thu, Aug 04, 2005 at 12:15:43PM +0200, Tobias Roth wrote:
> Hi
> 
> I tried out the --batch example from the DETAILS file (search for 'foo'
> in that file to find the example). This is what I got:
> 
> Assertion failed: (pkt->pkt.generic), function build_packet, file
> build-packet.c , line 74.
> 
> The same example seems to work with 1.4.1. The systems tested are
> FreeBSD 5.4-STABLE and 6.0-BETA1, I was not able to test on a different
> system, so I cannot say if this is OS specific.

Try this patch.

David
-------------- next part --------------
Index: keygen.c
===================================================================
--- keygen.c	(revision 3847)
+++ keygen.c	(working copy)
@@ -2667,7 +2667,11 @@
   PACKET *pkt;
 
   pkt=xmalloc_clear(sizeof(*pkt));
-  pkt->pkttype=PKT_NONE;
+
+  pkt->pkttype=PKT_USER_ID;
+  pkt->pkt.user_id=xmalloc_clear(sizeof *pkt->pkt.user_id);
+  pkt->pkt.user_id->ref=1;
+
   *tree=new_kbnode(pkt);
   delete_kbnode(*tree);
 }


More information about the Gnupg-devel mailing list