[gnutls-dev] [PATCH] Fix use of uninitialized variable in `gnutls_certificate_set_openpgp_key_mem ()'

Ludovic Courtès ludo at chbouib.org
Wed Jun 13 19:42:39 CEST 2007


* libextra/gnutls_openpgp.c (stream_to_datum): Check whether INP is NULL
  rather than checking BUF (which is not initialized yet).
---
 libextra/gnutls_openpgp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c
index ddbbfc9..7ed57da 100644
--- a/libextra/gnutls_openpgp.c
+++ b/libextra/gnutls_openpgp.c
@@ -528,7 +528,7 @@ stream_to_datum (cdk_stream_t inp, gnutls_datum_t * raw)
   uint8_t *buf;
   size_t buflen;
 
-  if (!buf || !raw)
+  if (!inp || !raw)
     {
       gnutls_assert ();
       return GNUTLS_E_INVALID_REQUEST;
-- 
1.4.4.4





More information about the Gnutls-dev mailing list