summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authortb <>2020-11-25 21:17:52 +0000
committertb <>2020-11-25 21:17:52 +0000
commit143c67355191b6f6ff2cfccb3f876320138a37fb (patch)
tree6658abd0ba870d77cbb0aa60a0607146508d9159 /src/lib/libssl/ssl_lib.c
parentc77e1ca5ca01ce42fde26161844ab04c5c3ae055 (diff)
downloadopenbsd-143c67355191b6f6ff2cfccb3f876320138a37fb.tar.gz
openbsd-143c67355191b6f6ff2cfccb3f876320138a37fb.tar.bz2
openbsd-143c67355191b6f6ff2cfccb3f876320138a37fb.zip
Avoid undefined behavior due to memcpy(NULL, NULL, 0)
This happens if name->der_len == 0. Since we already have a length check, we can malloc and memcpy inside the conditional. This also makes the code easier to read. agreement from millert ok jsing
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
0 files changed, 0 insertions, 0 deletions