Message ID | 1322680968-6470-1-git-send-email-sjur.brandeland@stericsson.com |
---|---|
State | Accepted, archived |
Delegated to: | David Miller |
Headers | show |
From: Sjur Brændeland <sjur.brandeland@stericsson.com> Date: Wed, 30 Nov 2011 20:22:46 +0100 > Allow NULL pointer in cfpkt_extr_head in order to > skip past header data. > > Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/caif/cfpkt_skbuff.c b/net/caif/cfpkt_skbuff.c index df08c47..de53907 100644 --- a/net/caif/cfpkt_skbuff.c +++ b/net/caif/cfpkt_skbuff.c @@ -144,7 +144,8 @@ int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len) } from = skb_pull(skb, len); from -= len; - memcpy(data, from, len); + if (data) + memcpy(data, from, len); return 0; }
Allow NULL pointer in cfpkt_extr_head in order to skip past header data. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> --- net/caif/cfpkt_skbuff.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)