CVSROOT: /cvs Module name: src Changes by: t...@cvs.openbsd.org 2023/03/06 01:08:31
Modified files: lib/libcrypto/asn1: tasn_enc.c Log message: 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