Skip to content

Commit 57e60c8

Browse files
author
tb
committed
bio chain test: fix inconsequential off-by-one
1 parent f00088e commit 57e60c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/regress/lib/libcrypto/bio/bio_chain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: bio_chain.c,v 1.6 2022/12/08 18:33:20 tb Exp $ */
1+
/* $OpenBSD: bio_chain.c,v 1.7 2022/12/08 18:34:00 tb Exp $ */
22
/*
33
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
44
*
@@ -338,7 +338,7 @@ link_chains_at(size_t i, size_t j, int use_bio_push)
338338
memset(A, 0, sizeof(A));
339339
memset(B, 0, sizeof(B));
340340

341-
if (i > nitems(A) || j > nitems(B))
341+
if (i >= nitems(A) || j >= nitems(B))
342342
goto err;
343343

344344
/* Create two linear chains of BIOs. */

0 commit comments

Comments
 (0)