From 7bb2cb9ad563d4c150c494fbe0ec75f5be7707d0 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 8 Dec 2022 18:34:00 +0000 Subject: [PATCH] bio chain test: fix inconsequential off-by-one --- regress/lib/libcrypto/bio/bio_chain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/lib/libcrypto/bio/bio_chain.c b/regress/lib/libcrypto/bio/bio_chain.c index 1dbcdd06699..2fb6e7f8721 100644 --- a/regress/lib/libcrypto/bio/bio_chain.c +++ b/regress/lib/libcrypto/bio/bio_chain.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_chain.c,v 1.6 2022/12/08 18:33:20 tb Exp $ */ +/* $OpenBSD: bio_chain.c,v 1.7 2022/12/08 18:34:00 tb Exp $ */ /* * Copyright (c) 2022 Theo Buehler * @@ -338,7 +338,7 @@ link_chains_at(size_t i, size_t j, int use_bio_push) memset(A, 0, sizeof(A)); memset(B, 0, sizeof(B)); - if (i > nitems(A) || j > nitems(B)) + if (i >= nitems(A) || j >= nitems(B)) goto err; /* Create two linear chains of BIOs. */ -- 2.20.1