diff options
author | tb <> | 2020-09-03 17:19:27 +0000 |
---|---|---|
committer | tb <> | 2020-09-03 17:19:27 +0000 |
commit | 4bf78c9d27fd63450872f4391ac1bd558c36d841 (patch) | |
tree | 2a2c7740f232472e228aec33ccdf9027c7101c03 /src/lib/libssl/ssl_srvr.c | |
parent | cc6d5f23315f01aac985d2090e0597d9f756f99b (diff) | |
download | openbsd-4bf78c9d27fd63450872f4391ac1bd558c36d841.tar.gz openbsd-4bf78c9d27fd63450872f4391ac1bd558c36d841.tar.bz2 openbsd-4bf78c9d27fd63450872f4391ac1bd558c36d841.zip |
Remove unnecessary zeroing after recallocarray(3)
Zap a memset that was redundant since OpenSSL 0.97b was merged by
markus in 2003. Nowadays it's otto's recallocarray(3) that does the
zeroing.
ok beck inoguchi otto
PS: ASN1_BIT_STRING_set_bit(3) was committed on Dec 21 1998 by Ralf S.
Engelschnall and used this bizarre allocation idiom:
if (a->data == NULL)
c=(unsigned char *)Malloc(w+1);
else
c=(unsigned char *)Realloc(a->data,w+1);
People complained about Malloc, Realloc and Free being used elsewhere, so
on Jun 1 2000, Richarde Levitte swept the OpenSSL tree and it became this.
if (a->data == NULL)
c=(unsigned char *)OPENSSL_malloc(w+1);
else
c=(unsigned char *)OPENSSL_realloc(a->data,w+1);
Then it was found that existing data should be cleaned, and on Nov 13 2002
Ben Laurie changed the last line to
c=(unsigned char *)OPENSSL_realloc_clean(a->data,
a->length,
w+1);
Diffstat (limited to 'src/lib/libssl/ssl_srvr.c')
0 files changed, 0 insertions, 0 deletions