x509_asid: NULL out min/max on extract_min_max() failure
authortb <tb@openbsd.org>
Tue, 20 Feb 2024 14:58:16 +0000 (14:58 +0000)
committertb <tb@openbsd.org>
Tue, 20 Feb 2024 14:58:16 +0000 (14:58 +0000)
requested by/ok jsing

lib/libcrypto/x509/x509_asid.c

index c9d3c8d..2fda58c 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: x509_asid.c,v 1.42 2024/02/19 15:44:10 tb Exp $ */
+/*     $OpenBSD: x509_asid.c,v 1.43 2024/02/20 14:58:16 tb Exp $ */
 /*
  * Contributed to the OpenSSL Project by the American Registry for
  * Internet Numbers ("ARIN").
@@ -558,6 +558,8 @@ extract_min_max(ASIdOrRange *aor, ASN1_INTEGER **min, ASN1_INTEGER **max)
                *max = aor->u.range->max;
                return 1;
        }
+       *min = NULL;
+       *max = NULL;
 
        return 0;
 }