diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-03 23:11:27 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-02-03 23:14:24 +0100 |
commit | 88534b8fb4b6e3ae6493b41c7030395df3f9ee6c (patch) | |
tree | 9f3f2a89a4d733e1b5ba9c2dc656b92f2770f985 | |
parent | 870682d8a445dd5e39e2fd717d5f9e6a124a7c58 (diff) | |
download | gnutls-88534b8fb4b6e3ae6493b41c7030395df3f9ee6c.tar.gz |
gnutls_pkcs11_obj_list_import_url4: always return an initialized pointer
When returning success, but no elements, gnutls_pkcs11_obj_list_import_url4,
could have returned zero number of elements with a pointer that was uninitialized.
Ensure that an initialized (i.e., null in that case), pointer is always returned.
Reported by Jeremy Harris.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | lib/pkcs11.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pkcs11.c b/lib/pkcs11.c index 21f8bc3ddb..2473a4c753 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -3138,6 +3138,7 @@ gnutls_pkcs11_obj_list_import_url4(gnutls_pkcs11_obj_t ** p_list, if (ret < 0) { gnutls_assert(); if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { + *p_list = NULL; *n_list = 0; ret = 0; } |