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
commitcc64a1f7cecec63541a2635f124c914c60d4952a (patch)
treec839ab4f405bfea1c43fddd81eb73b59b27f5ef3 /src/lib/libssl/ssl_ciph.c
parent5678643e1eb5747220973202370142ccae43cddd (diff)
downloadopenbsd-cc64a1f7cecec63541a2635f124c914c60d4952a.tar.gz
openbsd-cc64a1f7cecec63541a2635f124c914c60d4952a.tar.bz2
openbsd-cc64a1f7cecec63541a2635f124c914c60d4952a.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