From: Nikos Mavrogiannopoulos Date: Wed, 25 Jun 2014 12:16:22 +0000 (+0200) Subject: pkcs11: avoid callig _gnutls_bin2hex() when length is zero. X-Git-Tag: gnutls_3_3_5~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cbf603899674b376878a80f1ca30dd87f4a16dfb;p=thirdparty%2Fgnutls.git pkcs11: avoid callig _gnutls_bin2hex() when length is zero. --- diff --git a/lib/pkcs11.c b/lib/pkcs11.c index c32c616a0e..38630839b6 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -457,7 +457,7 @@ pkcs11_get_info(struct p11_kit_uri *info, *output_size = length * 3; return GNUTLS_E_SHORT_MEMORY_BUFFER; } - if (output) + if (output && length > 0) _gnutls_bin2hex(data, length, output, *output_size, ":"); *output_size = length * 3;