From: dtucker@openbsd.org Date: Thu, 2 Oct 2025 08:38:43 +0000 (+0000) Subject: upstream: Relax array check slightly. Prevents compiler warnings X-Git-Tag: V_10_1_P1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3957cc2914cdc88932c972413853f8b68c1ffba5;p=thirdparty%2Fopenssh-portable.git upstream: Relax array check slightly. Prevents compiler warnings in -portable when there are no kbdint devices present. ok djm@ OpenBSD-Commit-ID: c1c050cecd642d6073c792201908fd225191df93 --- diff --git a/auth2-chall.c b/auth2-chall.c index bc2482a03..a6d916598 100644 --- a/auth2-chall.c +++ b/auth2-chall.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-chall.c,v 1.56 2025/09/29 21:37:52 dtucker Exp $ */ +/* $OpenBSD: auth2-chall.c,v 1.57 2025/10/02 08:38:43 dtucker Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. * Copyright (c) 2001 Per Allansson. All rights reserved. @@ -166,7 +166,7 @@ kbdint_next_device(Authctxt *authctxt, KbdintAuthctxt *kbdintctxt) break; for (i = 0; devices[i]; i++) { if (i >= sizeof(kbdintctxt->devices_done) * 8 || - i >= sizeof(devices) / sizeof(devices[0]) - 1) + i >= sizeof(devices) / sizeof(devices[0])) fatal_f("internal error: too may devices"); if ((kbdintctxt->devices_done & (1 << i)) != 0 || !auth2_method_allowed(authctxt,