summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_ciph.c
diff options
context:
space:
mode:
authormiod <>2014-05-26 20:54:06 +0000
committermiod <>2014-05-26 20:54:06 +0000
commitff902a2ab8de41d828e44691e4fcd5e828a0ee2c (patch)
treec839ab4f405bfea1c43fddd81eb73b59b27f5ef3 /src/lib/libssl/ssl_ciph.c
parentbc3247c8eb23411aa06a89056f623998745a0bb5 (diff)
downloadopenbsd-ff902a2ab8de41d828e44691e4fcd5e828a0ee2c.tar.gz
openbsd-ff902a2ab8de41d828e44691e4fcd5e828a0ee2c.tar.bz2
openbsd-ff902a2ab8de41d828e44691e4fcd5e828a0ee2c.zip
Replace the following logic:
if (nothing to allocate) ptr = malloc(1) else { if ((ptr = malloc(size to allocate)) memcpy(ptr, data to copy, size to allocate) } if (ptr == NULL) OMG ERROR with a saner logic where the NULL pointer check if moved to the actual malloc branch, so that we do not need to malloc a single byte, just to avoid having a NULL pointer. Whoever thought allocating a single byte was a smart idea was obviously not taking his meds. ok beck@ guenther@
Diffstat (limited to 'src/lib/libssl/ssl_ciph.c')
0 files changed, 0 insertions, 0 deletions