diff options
author | miod <> | 2014-09-28 10:50:33 +0000 |
---|---|---|
committer | miod <> | 2014-09-28 10:50:33 +0000 |
commit | 1863db1d9486a762fe4bfcd46c7cce5e0971ed13 (patch) | |
tree | 9c5f5b5e201df6f69a6835a1a72734723914591f /src/lib/libssl/ssl.h | |
parent | e7bb93c6df18cb8454fa5fc190c887e34f3a324b (diff) | |
download | openbsd-1863db1d9486a762fe4bfcd46c7cce5e0971ed13.tar.gz openbsd-1863db1d9486a762fe4bfcd46c7cce5e0971ed13.tar.bz2 openbsd-1863db1d9486a762fe4bfcd46c7cce5e0971ed13.zip |
Someone (TM) thought it was smart to save memory by using malloc(1) and
manual field fiddling to create an ASN1_INTEGER object, instead of using
M_ASN1_INTEGER_new() which will allocate sizeof(long) bytes.
That person had probably never looked into malloc(3) and never heard of
allocation size rounding.
Thus, replace the obfuscated code with M_ASN1_INTEGER_new() followed by
ASN1_INTEGER_set(), to achieve a similar result, without the need for
/* version == 0 */ comments.
ok bcook@
Diffstat (limited to 'src/lib/libssl/ssl.h')
0 files changed, 0 insertions, 0 deletions