jobcore/p11-kit/0001-iter-Fix-recursive-attribute-loading.patch
2024-07-03 03:52:48 +03:00

24 lines
981 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
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) <heftig@archlinux.org>
---
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 d423b06e18b2..955d098393d7 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);