Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 526bdb80 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller
Browse files

[XFRM]: Prevent off-by-one access to xfrm_dispatch



Makes the type > XFRM_MSG_MAX check behave correctly to
protect access to xfrm_dispatch.

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e4553edd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -140,8 +140,9 @@ enum {
	XFRM_MSG_FLUSHPOLICY,
#define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY

	XFRM_MSG_MAX
	__XFRM_MSG_MAX
};
#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)

struct xfrm_user_tmpl {
	struct xfrm_id		id;