Permalink
Browse files

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>
  • Loading branch information...
Julian Anastasov authored and davem330 committed Aug 25, 2012
1 parent e8c75e2 commit 9eca2eb9942ee0b6f2bc76485e16e334aee2c0bf
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/nlattr.c
View
@@ -22,6 +22,10 @@ static const u16 nla_attr_minlen[NLA_TYPE_MAX+1] = {
[NLA_U64] = sizeof(u64),
[NLA_MSECS] = sizeof(u64),
[NLA_NESTED] = NLA_HDRLEN,
+ [NLA_S8] = sizeof(s8),
+ [NLA_S16] = sizeof(s16),
+ [NLA_S32] = sizeof(s32),
+ [NLA_S64] = sizeof(s64),
};
static int validate_nla(const struct nlattr *nla, int maxtype,

0 comments on commit 9eca2eb

Please sign in to comment.