]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
pkcs11: avoid callig _gnutls_bin2hex() when length is zero.
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 25 Jun 2014 12:16:22 +0000 (14:16 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Wed, 25 Jun 2014 12:16:22 +0000 (14:16 +0200)
lib/pkcs11.c

index c32c616a0ef42b9cb84b42be38b218327c8fa622..38630839b65f74833d9ee1a3f18b6909f392ab75 100644 (file)
@@ -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;