mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-22 05:16:38 +00:00
xfrm: fix XFRMA_MARK extraction in xfrm_mark_get
Determine the size of the xfrm_mark struct, not of its pointer. Signed-off-by: Andreas Steffen <andreas.steffen@strongswan.org> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
d3ead2413c
commit
4efd7e8335
@ -1586,7 +1586,7 @@ static inline struct xfrm_state *xfrm_input_state(struct sk_buff *skb)
|
|||||||
static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m)
|
static inline int xfrm_mark_get(struct nlattr **attrs, struct xfrm_mark *m)
|
||||||
{
|
{
|
||||||
if (attrs[XFRMA_MARK])
|
if (attrs[XFRMA_MARK])
|
||||||
memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(m));
|
memcpy(m, nla_data(attrs[XFRMA_MARK]), sizeof(struct xfrm_mark));
|
||||||
else
|
else
|
||||||
m->v = m->m = 0;
|
m->v = m->m = 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user