diff options
author | Thomas Graf <tgraf@suug.ch> | 2005-05-03 17:26:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-05-03 17:26:01 -0400 |
commit | 526bdb80a23b2e10ed4ccc3fcf309c9118d892d6 (patch) | |
tree | d1e681c9404a7ce9ab24f14d198b44b316043f6d /include | |
parent | e4553eddae592b948c9695c9a0002169b0cab6fc (diff) |
[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: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/xfrm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h index f0df02ae68a4..4d19b9e65317 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h | |||
@@ -140,8 +140,9 @@ enum { | |||
140 | XFRM_MSG_FLUSHPOLICY, | 140 | XFRM_MSG_FLUSHPOLICY, |
141 | #define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY | 141 | #define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY |
142 | 142 | ||
143 | XFRM_MSG_MAX | 143 | __XFRM_MSG_MAX |
144 | }; | 144 | }; |
145 | #define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1) | ||
145 | 146 | ||
146 | struct xfrm_user_tmpl { | 147 | struct xfrm_user_tmpl { |
147 | struct xfrm_id id; | 148 | struct xfrm_id id; |