found by "buffer overflow 'peerxfs' 6 <= 6" smatch error
tobhe@ had a remote peer attempt a transform type of 6 and it is caught
by earlier checks before getting here.
ok tobhe@
-/* $OpenBSD: policy.c,v 1.97 2023/11/10 08:03:02 tobhe Exp $ */
+/* $OpenBSD: policy.c,v 1.98 2024/02/03 00:54:14 jsg Exp $ */
/*
* Copyright (c) 2020-2021 Tobias Heider <tobhe@openbsd.org>
for (i = 0; i < peer->prop_nxforms; i++) {
tpeer = peer->prop_xforms + i;
- if (tpeer->xform_type > IKEV2_XFORMTYPE_MAX)
+ if (tpeer->xform_type >= IKEV2_XFORMTYPE_MAX)
continue;
if (noauth && tpeer->xform_type == IKEV2_XFORMTYPE_INTEGR)
return (0);