From 9cdf87f19431b32a50b12e468cf2a9557cfc3568 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 30 May 2002 16:47:45 +0000 Subject: Check the return values where memory allocation failures may happen. PR: 49 --- crypto/txt_db/txt_db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/txt_db') diff --git a/crypto/txt_db/txt_db.c b/crypto/txt_db/txt_db.c index e6334d6add..9b186f2da5 100644 --- a/crypto/txt_db/txt_db.c +++ b/crypto/txt_db/txt_db.c @@ -122,7 +122,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num) else { buf->data[offset-1]='\0'; /* blat the '\n' */ - p=(char *)OPENSSL_malloc(add+offset); + if (!(p=(char *)OPENSSL_malloc(add+offset))) goto err; offset=0; } pp=(char **)p; -- cgit v1.2.3