=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/openssl/ca.c,v retrieving revision 1.40 retrieving revision 1.41 diff -c -r1.40 -r1.41 *** src/usr.bin/openssl/ca.c 2021/08/28 05:14:30 1.40 --- src/usr.bin/openssl/ca.c 2021/08/28 05:30:09 1.41 *************** *** 1,4 **** ! /* $OpenBSD: ca.c,v 1.40 2021/08/28 05:14:30 inoguchi Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * --- 1,4 ---- ! /* $OpenBSD: ca.c,v 1.41 2021/08/28 05:30:09 inoguchi Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * *************** *** 2246,2252 **** /* We now just add it to the database */ row[DB_type] = malloc(2); ! tm = X509_get_notAfter(ret); row[DB_exp_date] = strndup(tm->data, tm->length); if (row[DB_type] == NULL || row[DB_exp_date] == NULL) { BIO_printf(bio_err, "Memory allocation failure\n"); --- 2246,2253 ---- /* We now just add it to the database */ row[DB_type] = malloc(2); ! if ((tm = X509_get_notAfter(ret)) == NULL) ! goto err; row[DB_exp_date] = strndup(tm->data, tm->length); if (row[DB_type] == NULL || row[DB_exp_date] == NULL) { BIO_printf(bio_err, "Memory allocation failure\n"); *************** *** 2503,2509 **** /* We now just add it to the database */ row[DB_type] = malloc(2); ! tm = X509_get_notAfter(x509); row[DB_exp_date] = strndup(tm->data, tm->length); if (row[DB_type] == NULL || row[DB_exp_date] == NULL) { BIO_printf(bio_err, "Memory allocation failure\n"); --- 2504,2511 ---- /* We now just add it to the database */ row[DB_type] = malloc(2); ! if ((tm = X509_get_notAfter(x509)) == NULL) ! goto err; row[DB_exp_date] = strndup(tm->data, tm->length); if (row[DB_type] == NULL || row[DB_exp_date] == NULL) { BIO_printf(bio_err, "Memory allocation failure\n");