]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Fix use of uninitialized variable in `gnutls_certificate_set_openpgp_key_mem ()'
authorLudovic Courtès <ludo@chbouib.org>
Wed, 13 Jun 2007 17:42:39 +0000 (19:42 +0200)
committerSimon Josefsson <simon@josefsson.org>
Thu, 14 Jun 2007 07:04:17 +0000 (09:04 +0200)
* libextra/gnutls_openpgp.c (stream_to_datum): Check whether INP is NULL
  rather than checking BUF (which is not initialized yet).

Signed-off-by: Simon Josefsson <simon@josefsson.org>
libextra/gnutls_openpgp.c

index ddbbfc9a79a09aaacaac77266f242552fdaf0db7..7ed57da5d9abc2431543188d106cb4c9b2663688 100644 (file)
@@ -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;