diff options
author | Ben Laurie <ben@openssl.org> | 2007-04-04 16:35:56 +0200 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2007-04-04 16:35:56 +0200 |
commit | 309fa55bbbc1465eb42fbe05c789a1e98c4ccb9a (patch) | |
tree | 8350129e219cb5c5e577a55025ae3e8cb58c7ddc /apps/ca.c | |
parent | Die if serial number is invalid. (diff) | |
download | openssl-309fa55bbbc1465eb42fbe05c789a1e98c4ccb9a.tar.xz openssl-309fa55bbbc1465eb42fbe05c789a1e98c4ccb9a.zip |
Return an error if the serial number is badly formed. (Coverity ID 116).
Diffstat (limited to 'apps/ca.c')
-rw-r--r-- | apps/ca.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -2406,6 +2406,8 @@ static int do_revoke(X509 *x509, CA_DB *db, int type, char *value) row[i]=NULL; row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0); bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL); + if (!bn) + goto err; if (BN_is_zero(bn)) row[DB_serial]=BUF_strdup("00"); else |