found by "buffer overflow 'peer->capa.add_path' 7 <= 7" smatch error
ok claudio@
-/* $OpenBSD: rde_peer.c,v 1.34 2023/11/07 11:17:35 claudio Exp $ */
+/* $OpenBSD: rde_peer.c,v 1.35 2024/02/03 09:26:52 jsg Exp $ */
/*
* Copyright (c) 2019 Claudio Jeker <claudio@openbsd.org>
int
peer_has_add_path(struct rde_peer *peer, uint8_t aid, int mode)
{
- if (aid > AID_MAX)
+ if (aid >= AID_MAX)
return 0;
if (aid == AID_UNSPEC) {
/* check if at capability is set for at least one AID */