From: Ludovic Courtès Date: Wed, 13 Jun 2007 17:42:39 +0000 (+0200) Subject: Fix use of uninitialized variable in `gnutls_certificate_set_openpgp_key_mem ()' X-Git-Tag: gnutls_1_7_14~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=937885f613a5dc4ef88a29f0070d3bc1ef752cc5;p=thirdparty%2Fgnutls.git Fix use of uninitialized variable in `gnutls_certificate_set_openpgp_key_mem ()' * 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 --- diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index ddbbfc9a79..7ed57da5d9 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;