Closed heftig closed 4 months ago
@ZoltanFridrich I think there's a problem with the recursive allocation during attribute loading. It should only recurse further if the current attribute is an array, not if the base attribute we're trying to load is an array, which it always is.
diff --git c/p11-kit/iter.c i/p11-kit/iter.c
index d423b06..955d098 100644
--- c/p11-kit/iter.c
+++ i/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);
Since 0.25.4, a build using
gcc -m32
(on x86_64) fails thetest-enumerate
test:backtrace:
A bisect points at 6529b540ce16cab9a589004152e3c1d1c05d200f.