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

Commit 9eca2eb9 authored by Julian Anastasov's avatar Julian Anastasov Committed by David S. Miller
Browse files

netlink: add minlen validation for the new signed types

parent e8c75e2c
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,10 @@ static const u16 nla_attr_minlen[NLA_TYPE_MAX+1] = {
	[NLA_U64]	= sizeof(u64),
	[NLA_U64]	= sizeof(u64),
	[NLA_MSECS]	= sizeof(u64),
	[NLA_MSECS]	= sizeof(u64),
	[NLA_NESTED]	= NLA_HDRLEN,
	[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,
static int validate_nla(const struct nlattr *nla, int maxtype,