Ensure we don't call memcpy with a NULL pointer
Ensure we don't call memcpy with a NULL pointer

Commit d5aa14dd simplified the bn_expand_internal() and BN_copy() functions.
Unfortunately it also removed some checks which are still required,
otherwise we call memcpy passing in NULL which is not allowed.

Reviewed-by: Tim Hudson <eb0be8e447f673b41b10eda09d63cd72526b0a42@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2836)
openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl,openssl/openssl