summaryrefslogtreecommitdiffstats
path: root/crypto/txt_db
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-05-30 16:47:45 +0000
committerRichard Levitte <levitte@openssl.org>2002-05-30 16:47:45 +0000
commit9cdf87f19431b32a50b12e468cf2a9557cfc3568 (patch)
tree5aa5e1f88093d6b8013b9e2f1af0b18201b9bef6 /crypto/txt_db
parenta81e9d3dc45f29c1a5fde7fa641a43f796fe92d4 (diff)
Check the return values where memory allocation failures may happen.
PR: 49
Diffstat (limited to 'crypto/txt_db')
-rw-r--r--crypto/txt_db/txt_db.c2
1 files changed, 1 insertions, 1 deletions
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;