summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/x_algor.c
diff options
context:
space:
mode:
authortb <>2023-03-06 08:08:31 +0000
committertb <>2023-03-06 08:08:31 +0000
commitec79b8a0caa19718e16811a1ca55f0c980ef6d2f (patch)
treeeed7711b1cc0c71d0017dc611ab43527b1c7ef41 /src/lib/libcrypto/asn1/x_algor.c
parent6bac610727a591217d2872d33752ba81334680ae (diff)
downloadopenbsd-ec79b8a0caa19718e16811a1ca55f0c980ef6d2f.tar.gz
openbsd-ec79b8a0caa19718e16811a1ca55f0c980ef6d2f.tar.bz2
openbsd-ec79b8a0caa19718e16811a1ca55f0c980ef6d2f.zip
ASN.1 enc: check ASN1_item_ex_i2d() consistency
The i2d API design is: call a function first with a pointer to NULL, get the length, allocate a buffer, call the function passing the buffer in. Both calls should be checked since ther are still internal allocations. At the heart of ASN.1 encoding, this idiom is used and the second call is assumed to succeed after the length was determined. This is far from guaranteed. Check that the second call returns the same length and error otherwise. ok jsing
Diffstat (limited to 'src/lib/libcrypto/asn1/x_algor.c')
0 files changed, 0 insertions, 0 deletions