diff options
author | tb <> | 2020-11-25 21:17:52 +0000 |
---|---|---|
committer | tb <> | 2020-11-25 21:17:52 +0000 |
commit | 143c67355191b6f6ff2cfccb3f876320138a37fb (patch) | |
tree | 6658abd0ba870d77cbb0aa60a0607146508d9159 /src/lib/libssl/ssl_lib.c | |
parent | c77e1ca5ca01ce42fde26161844ab04c5c3ae055 (diff) | |
download | openbsd-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