From 8660475bbdacccc5f1131923e4bac54237a3b2b4 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Wed, 16 Sep 2020 05:47:59 +0000 Subject: Make check in x509_verify_ctx_set_max_signatures() consistent with others. ok beck@ --- src/lib/libcrypto/x509/x509_verify.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index 967952ead0..a1a9ecc5af 100644 --- a/src/lib/libcrypto/x509/x509_verify.c +++ b/src/lib/libcrypto/x509/x509_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_verify.c,v 1.9 2020/09/16 05:47:01 jsing Exp $ */ +/* $OpenBSD: x509_verify.c,v 1.10 2020/09/16 05:47:59 jsing Exp $ */ /* * Copyright (c) 2020 Bob Beck * @@ -775,9 +775,7 @@ x509_verify_ctx_set_max_chains(struct x509_verify_ctx *ctx, size_t max) int x509_verify_ctx_set_max_signatures(struct x509_verify_ctx *ctx, size_t max) { - if (max < 1) - return 0; - if (max > 100000) + if (max < 1 || max > 100000) return 0; ctx->max_sigs = max; return 1; -- cgit v1.2.3-55-g6feb