CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2014/05/26 14:54:06

Modified files:
        lib/libssl/src/ssl: s3_lib.c t1_lib.c 

Log message:
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@

Reply via email to