Commit 6de41cf0 authored by Richard Levitte's avatar Richard Levitte
Browse files

If CRYPTO_realloc() is called with a NULL pointer, have it call

OPENSSL_malloc().
PR: 187
parent f8acaa92
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -226,6 +226,9 @@ void *CRYPTO_realloc(void *str, int num, const char *file, int line)
	{
	void *ret = NULL;

	if (str == NULL)
		return CRYPTO_malloc(num, file, line);

	if (realloc_debug_func != NULL)
		realloc_debug_func(str, NULL, num, file, line, 0);
	ret = realloc_func(str,num);