proto_read_attribute_array: When count is zero, make result a NULL ptr.
I am a bit uncertain about this change, since both NULL and non-NULL will make test cases fail within the SoftHSM test suite for example (some SoftHSM C_ functions want the pointer to be NULL when there are no attributes, and some allow (expect) it to be possible to pass a non-NULL pointer with a zero count). It seems that making it a NULL pointer when the count is 0 is the most sensible thing though. How could the C_ function use the data pointed to by the pointer, when the count says there is no data there? The result would really be undefined.
Loading
Please register or sign in to comment