diff options
author | Job Snijders <job@cvs.openbsd.org> | 2023-08-30 10:13:13 +0000 |
---|---|---|
committer | Job Snijders <job@cvs.openbsd.org> | 2023-08-30 10:13:13 +0000 |
commit | 2df2280020697b5530f5174d0ff53f059feaa4d0 (patch) | |
tree | ecf72d56a0c67d055c2965fffc221b69fdeb4a85 /regress/lib | |
parent | fd7fa8e97e73b84d207c1d53d94b92032139c72d (diff) |
Ensure no memory is leaked after passing NULL to ASN1_TIME_normalize()
OK tb@
Diffstat (limited to 'regress/lib')
-rw-r--r-- | regress/lib/libcrypto/asn1/asn1time.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/lib/libcrypto/asn1/asn1time.c b/regress/lib/libcrypto/asn1/asn1time.c index 0adac08300e..65c36dfb01f 100644 --- a/regress/lib/libcrypto/asn1/asn1time.c +++ b/regress/lib/libcrypto/asn1/asn1time.c @@ -1,4 +1,4 @@ -/* $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> * @@ -528,5 +528,8 @@ main(int argc, char **argv) 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); } |