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

Commit f5d410f2 authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso Committed by David S. Miller
Browse files

netlink: fix unaligned access in nla_get_be64()



This patch fixes a unaligned access in nla_get_be64() that was
introduced by myself in a17c8598.

Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6830c25b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const struct nlattr *nla)
 */
static inline __be64 nla_get_be64(const struct nlattr *nla)
{
	return *(__be64 *) nla_data(nla);
	__be64 tmp;

	nla_memcpy(&tmp, nla, sizeof(tmp));

	return tmp;
}

/**