Fix CRYPTO_strdup
authorLoganaden Velvindron <loganaden@gmail.com>
Wed, 22 Apr 2015 15:16:30 +0000 (16:16 +0100)
committerMatt Caswell <matt@openssl.org>
Wed, 22 Apr 2015 16:26:20 +0000 (17:26 +0100)
commit50c2c64fe76c65f5dda8fb1180a435198c14fba7
treee139df7efac28d070d79f1d95e15bf213704b21f
parenta6202a74f9fd459607adaec9e4c7aa8d103dbd11
Fix CRYPTO_strdup

The function CRYPTO_strdup (aka OPENSSL_strdup) fails to check the return
value from CRYPTO_malloc to see if it is NULL before attempting to use it.
This patch adds a NULL check.

RT3786

Signed-off-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 37b0cf936744d9edb99b5dd82cae78a7eac6ad60)

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 20d21389c8b6f5b754573ffb6a4dc4f3986f2ca4)
crypto/mem.c