From: tb Date: Thu, 8 Dec 2022 18:34:00 +0000 (+0000) Subject: bio chain test: fix inconsequential off-by-one X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7bb2cb9ad563d4c150c494fbe0ec75f5be7707d0;p=openbsd bio chain test: fix inconsequential off-by-one --- 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. */