diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-03-01 16:39:25 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2012-03-01 16:39:25 +0100 |
commit | c7eeb5502fe030fd75229eec2c05427f3df374c6 (patch) | |
tree | 2e47c586ff64374061de337350b294c3aace7958 | |
parent | 422214868061370aeeb0ac9cd0f021a5c350a57d (diff) | |
download | gnutls-c7eeb5502fe030fd75229eec2c05427f3df374c6.tar.gz |
No longer crash on a pkcs11 object without an ID.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | lib/pkcs11.c | 6 |
2 files changed, 9 insertions, 0 deletions
@@ -8,6 +8,9 @@ Version 2.12.17 (unreleased) ** libgnutls: Corrections in record packet parsing. Reported by Matthew Hall. +** libgnutls: PKCS #11 objects that do not have ID +no longer crash listing. Reported by Sven Geggus. + ** API and ABI modifications: No changes since last version. diff --git a/lib/pkcs11.c b/lib/pkcs11.c index 83fad64b89..f4f64f702b 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -396,6 +396,12 @@ pkcs11_get_info (struct p11_kit_uri *info, (int)version->minor); terminate = 1; } + else + { + *output_size = 0; + if (output) ((uint8_t*)output)[0] = 0; + return 0; + } if (hexify) { |