CVSROOT:        /cvs
Module name:    src
Changes by:     js...@cvs.openbsd.org   2022/03/17 11:17:58

Modified files:
        lib/libcrypto/asn1: a_string.c 

Log message:
Rework ASN1_STRING_set()

Rework ASN1_STRING_set() so that we always clear and free an existing
allocation, prior to storing the new data. This fixes a number of issues,
including a failure to zero data if the existing allocation was too small.
This also fixes other bugs such as leaving the allocation uninitialised
if NULL is passed for data. Require -1 where strlen() is expected and
improve length and overflow checks.

ok inoguchi@ tb@

Reply via email to