-/* $OpenBSD: a_time_tm.c,v 1.29 2023/07/07 19:37:52 beck Exp $ */
+/* $OpenBSD: a_time_tm.c,v 1.30 2023/08/30 10:13:12 job Exp $ */
/*
* Copyright (c) 2015 Bob Beck <beck@openbsd.org>
*
{
struct tm tm;
+ if (t == NULL)
+ return 0;
if (!ASN1_TIME_to_tm(t, &tm))
return 0;
return tm_to_rfc5280_time(&tm, t) != NULL;
-/* $OpenBSD: asn1time.c,v 1.16 2022/09/05 21:06:31 tb Exp $ */
+/* $OpenBSD: asn1time.c,v 1.17 2023/08/30 10:13:12 job Exp $ */
/*
* Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
*
failed |= asn1_time_test(i, att, V_ASN1_GENERALIZEDTIME);
}
+ /* Check for a leak in ASN1_TIME_normalize(). */
+ failed |= ASN1_TIME_normalize(NULL) != 0;
+
return (failed);
}