From: Andreas Steffen Date: Wed, 30 Jun 2010 17:41:15 +0000 (-0700) Subject: xfrm: fix XFRMA_MARK extraction in xfrm_mark_get X-Git-Tag: MMI-PSA29.97-13-9~23139^2~61 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4efd7e833591721bec21cc4730a7f6261417840f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 1913af67c43d..fc8f36dd0f5c 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -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) { 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 m->v = m->m = 0;