diff options
author | Matt Caswell <matt@openssl.org> | 2018-01-19 14:48:45 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-01-22 10:19:55 +0000 |
commit | a3d684ffca282796511cb8f3593a59a80109eed8 (patch) | |
tree | f06fb584c918adf5780807b25887dcd3921c4513 | |
parent | dd37f6f12cc14cc4710289746b112eb0fed3b0b7 (diff) |
Don't crash on a missing Subject in index.txt
An index.txt entry which has an empty Subject name field will cause ca
to crash. Therefore check it when we load it to make sure its not empty.
Fixes #5109
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5115)
-rw-r--r-- | apps/ca.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -880,6 +880,10 @@ int MAIN(int argc, char **argv) } p++; } + if (pp[DB_name][0] == '\0') { + BIO_printf(bio_err, "entry %d: bad Subject\n", i + 1); + goto err; + } } if (verbose) { BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT); /* cannot fail */ |