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:13:27 +0100 |
commit | 3f6db7e15631f277beab72e9fe15772b4991dae1 (patch) | |
tree | 0e5eacbb342f13a981c028172f47c17358e1e983 | |
parent | f8649d94f9da479a8f27c19dd9aac43c08d26088 (diff) | |
download | gnutls-3f6db7e15631f277beab72e9fe15772b4991dae1.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; } |