diff options
author | Thomas Graf <tgraf@suug.ch> | 2005-05-03 14:26:01 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-05-03 14:26:01 -0700 |
commit | 526bdb80a23b2e10ed4ccc3fcf309c9118d892d6 (patch) | |
tree | d1e681c9404a7ce9ab24f14d198b44b316043f6d /include/linux/xfrm.h | |
parent | e4553eddae592b948c9695c9a0002169b0cab6fc (diff) | |
download | kernel_samsung_espresso10-526bdb80a23b2e10ed4ccc3fcf309c9118d892d6.zip kernel_samsung_espresso10-526bdb80a23b2e10ed4ccc3fcf309c9118d892d6.tar.gz kernel_samsung_espresso10-526bdb80a23b2e10ed4ccc3fcf309c9118d892d6.tar.bz2 |
[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/linux/xfrm.h')
-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 f0df02a..4d19b9e 100644 --- a/include/linux/xfrm.h +++ b/include/linux/xfrm.h @@ -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; |