summaryrefslogtreecommitdiff
path: root/src/lib/libc
diff options
context:
space:
mode:
authortb <>2020-11-25 21:17:52 +0000
committertb <>2020-11-25 21:17:52 +0000
commite184d9b4d57f92ba4003625ca5e4bf386ad6843f (patch)
tree6658abd0ba870d77cbb0aa60a0607146508d9159 /src/lib/libc
parent4594ab4487e73070cff05c330cce9ed796246510 (diff)
downloadopenbsd-e184d9b4d57f92ba4003625ca5e4bf386ad6843f.tar.gz
openbsd-e184d9b4d57f92ba4003625ca5e4bf386ad6843f.tar.bz2
openbsd-e184d9b4d57f92ba4003625ca5e4bf386ad6843f.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/libc')
0 files changed, 0 insertions, 0 deletions