summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/malloc-wrapper.c
diff options
context:
space:
mode:
authortb <>2023-12-14 12:02:10 +0000
committertb <>2023-12-14 12:02:10 +0000
commit12a7c59c2985d4787deb1a503da3768c45dd7b22 (patch)
tree4908d2d7ad0072f6f41bdbb32a1e687f4e61d0a5 /src/lib/libcrypto/malloc-wrapper.c
parent1d1bc4a77d9495d0441867034632ed5ba3730a44 (diff)
downloadopenbsd-12a7c59c2985d4787deb1a503da3768c45dd7b22.tar.gz
openbsd-12a7c59c2985d4787deb1a503da3768c45dd7b22.tar.bz2
openbsd-12a7c59c2985d4787deb1a503da3768c45dd7b22.zip
Fix sk_deep_copy() implementation
sk_deep_copy() is bad code. It is less bad than the upstream code, but still bad: it passes strdup() through a void pointer and assigns it to a function pointer of different type before calling the latter. That's not kosher in more than one way. There is no need for such gymnastics. If we need a deep copy for a type, we should implement it as appropriate for that type. Also, we should not expect and even less so allow holes in a STACK_OF(). The only way the vpm->hosts can be populated is by way of this deep_copy function or x509_param_set_hosts_internal(), which pushes only after a non-NULL check. Invariants: they're useful. ok jsing
Diffstat (limited to 'src/lib/libcrypto/malloc-wrapper.c')
0 files changed, 0 insertions, 0 deletions