summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_trs.c
diff options
context:
space:
mode:
authormiod <>2014-09-28 10:50:33 +0000
committermiod <>2014-09-28 10:50:33 +0000
commitb486c9d0043a8b4a2b8bc2005c207b48fd310242 (patch)
tree9c5f5b5e201df6f69a6835a1a72734723914591f /src/lib/libcrypto/x509/x509_trs.c
parent9db6a5b9d7bcae094827d75a94a39b0626456b92 (diff)
downloadopenbsd-b486c9d0043a8b4a2b8bc2005c207b48fd310242.tar.gz
openbsd-b486c9d0043a8b4a2b8bc2005c207b48fd310242.tar.bz2
openbsd-b486c9d0043a8b4a2b8bc2005c207b48fd310242.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/libcrypto/x509/x509_trs.c')
0 files changed, 0 insertions, 0 deletions