Skip to content

Commit 3957cc2

Browse files
committed
upstream: Relax array check slightly. Prevents compiler warnings
in -portable when there are no kbdint devices present. ok djm@ OpenBSD-Commit-ID: c1c050cecd642d6073c792201908fd225191df93
1 parent 6a239b0 commit 3957cc2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

auth2-chall.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: auth2-chall.c,v 1.56 2025/09/29 21:37:52 dtucker Exp $ */
1+
/* $OpenBSD: auth2-chall.c,v 1.57 2025/10/02 08:38:43 dtucker Exp $ */
22
/*
33
* Copyright (c) 2001 Markus Friedl. All rights reserved.
44
* Copyright (c) 2001 Per Allansson. All rights reserved.
@@ -166,7 +166,7 @@ kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt)
166166
break;
167167
for (i = 0; devices[i]; i++) {
168168
if (i >= sizeof(kbdintctxt->devices_done) * 8 ||
169-
i >= sizeof(devices) / sizeof(devices[0]) - 1)
169+
i >= sizeof(devices) / sizeof(devices[0]))
170170
fatal_f("internal error: too may devices");
171171
if ((kbdintctxt->devices_done & (1 << i)) != 0 ||
172172
!auth2_method_allowed(authctxt,

0 commit comments

Comments
 (0)