From: Hikar Date: Sat, 18 Feb 2017 07:44:49 +0000 (+0100) Subject: Removed ugly size_t less than zero check. X-Git-Tag: OpenSSL_1_1_0f~226 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c62ee12574e661a111238954b07ea1d5f0786bec;p=oweals%2Fopenssl.git Removed ugly size_t less than zero check. CLA: trivial. Reviewed-by: Richard Levitte Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2674) (cherry picked from commit 5e1f879ab5a2bfdf2d58222f965f93fe1b511ce7) --- diff --git a/crypto/mem.c b/crypto/mem.c index 02aa43a7ef..bc35132fc7 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -75,7 +75,7 @@ void *CRYPTO_malloc(size_t num, const char *file, int line) if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc) return malloc_impl(num, file, line); - if (num <= 0) + if (num == 0) return NULL; allow_customize = 0;