[svn] GnuPG - r4480 - trunk/g10
svn author wk
cvs at cvs.gnupg.org
Mon Apr 16 20:57:24 CEST 2007
Author: wk
Date: 2007-04-16 20:57:23 +0200 (Mon, 16 Apr 2007)
New Revision: 4480
Modified:
trunk/g10/ChangeLog
trunk/g10/build-packet.c
Log:
* build-packet.c (mpi_write): Made buffer a bit larger. Reported
by Alexander Feigl.
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2007-04-16 15:37:45 UTC (rev 4479)
+++ trunk/g10/ChangeLog 2007-04-16 18:57:23 UTC (rev 4480)
@@ -1,3 +1,8 @@
+2007-04-16 Werner Koch <wk at g10code.com>
+
+ * build-packet.c (mpi_write): Made buffer a bit larger. Reported
+ by Alexander Feigl.
+
2007-04-13 Werner Koch <wk at g10code.com>
* call-agent.c (start_agent): Don't use log_error when using the
Modified: trunk/g10/build-packet.c
===================================================================
--- trunk/g10/build-packet.c 2007-04-16 15:37:45 UTC (rev 4479)
+++ trunk/g10/build-packet.c 2007-04-16 18:57:23 UTC (rev 4480)
@@ -157,11 +157,11 @@
static int
mpi_write (iobuf_t out, gcry_mpi_t a)
{
- char buffer[(MAX_EXTERN_MPI_BITS+7)/8];
+ char buffer[(MAX_EXTERN_MPI_BITS+7)/8+2]; /* 2 is for the mpi length. */
size_t nbytes;
int rc;
- nbytes = (MAX_EXTERN_MPI_BITS+7)/8 + 2; /* 2 is for the mpi length. */
+ nbytes = DIM(buffer);
rc = gcry_mpi_print (GCRYMPI_FMT_PGP, buffer, nbytes, &nbytes, a );
if( !rc )
rc = iobuf_write( out, buffer, nbytes );
More information about the Gnupg-commits
mailing list