diff options
author | Julian Anastasov <ja@ssi.bg> | 2012-08-25 18:47:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-30 13:11:46 -0400 |
commit | 9eca2eb9942ee0b6f2bc76485e16e334aee2c0bf (patch) | |
tree | a4f4f6759e4558651975a856578f732da46876d8 /lib | |
parent | e8c75e2c1c6965d071d50620278df78f65cfe082 (diff) |
netlink: add minlen validation for the new signed types
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/nlattr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/nlattr.c b/lib/nlattr.c index 4226dfeb5178..18eca7809b08 100644 --- a/lib/nlattr.c +++ b/lib/nlattr.c | |||
@@ -22,6 +22,10 @@ static const u16 nla_attr_minlen[NLA_TYPE_MAX+1] = { | |||
22 | [NLA_U64] = sizeof(u64), | 22 | [NLA_U64] = sizeof(u64), |
23 | [NLA_MSECS] = sizeof(u64), | 23 | [NLA_MSECS] = sizeof(u64), |
24 | [NLA_NESTED] = NLA_HDRLEN, | 24 | [NLA_NESTED] = NLA_HDRLEN, |
25 | [NLA_S8] = sizeof(s8), | ||
26 | [NLA_S16] = sizeof(s16), | ||
27 | [NLA_S32] = sizeof(s32), | ||
28 | [NLA_S64] = sizeof(s64), | ||
25 | }; | 29 | }; |
26 | 30 | ||
27 | static int validate_nla(const struct nlattr *nla, int maxtype, | 31 | static int validate_nla(const struct nlattr *nla, int maxtype, |