patch for gcry_mpi_print

Nikos Mavroyanopoulos nmav@gnutls.org
Tue, 1 Apr 2003 22:47:39 +0300


--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

The attached patch prevents some valgrind warnings.

-- 
Nikos Mavroyanopoulos

--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: mpicoder.c
===================================================================
RCS file: /cvs/gnupg/libgcrypt/mpi/mpicoder.c,v
retrieving revision 1.32
diff -u -u -r1.32 mpicoder.c
--- mpicoder.c	25 Jun 2002 11:12:44 -0000	1.32
+++ mpicoder.c	1 Apr 2003 19:41:01 -0000
@@ -463,6 +463,9 @@
     if( !nbytes )
 	return GCRYERR_INV_ARG;
 
+    if (buffer==NULL)
+        *nbytes = 0;
+
     len = *nbytes;
     *nbytes = 0;
     if( format == GCRYMPI_FMT_STD ) {

--CE+1k2dSO48ffgeK--