(mem_getkeys): allocate one more the we have elements so its possible
to store the NULL pointer at the end. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20396 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -162,7 +162,7 @@ mem_getkeys(hx509_context context,
|
||||
|
||||
for (i = 0; mem->keys && mem->keys[i]; i++)
|
||||
;
|
||||
*keys = calloc(i, sizeof(**keys));
|
||||
*keys = calloc(i + 1, sizeof(**keys));
|
||||
for (i = 0; mem->keys && mem->keys[i]; i++) {
|
||||
(*keys)[i] = _hx509_private_key_ref(mem->keys[i]);
|
||||
if ((*keys)[i] == NULL) {
|
||||
|
Reference in New Issue
Block a user