From ce2e51639726bfc1691113c2f7fdc481dad2d66a Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Tue, 2 Jul 2024 22:34:26 +0200 Subject: [PATCH] iter: Fix recursive attribute loading Fixes: https://github.com/p11-glue/p11-kit/issues/641 Signed-off-by: Jan Alexander Steffens (heftig) --- p11-kit/iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p11-kit/iter.c b/p11-kit/iter.c index d423b06e..955d0983 100644 --- a/p11-kit/iter.c +++ b/p11-kit/iter.c @@ -1048,7 +1048,7 @@ prepare_recursive_attribute (P11KitIter *iter, templ[i].pValue = malloc (templ[i].ulValueLen); return_val_if_fail (templ[i].pValue != NULL, CKR_HOST_MEMORY); - if (IS_ATTRIBUTE_ARRAY (attr)) { + if (IS_ATTRIBUTE_ARRAY (templ + i)) { rv = prepare_recursive_attribute (iter, attr, templ[i].pValue, templ[i].ulValueLen); return_val_if_fail (rv == CKR_OK, rv);