diff options
author | sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> | 2011-11-30 09:22:46 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-30 23:30:47 -0500 |
commit | 200c5a3b387c415e49639ee0f6de37804522b745 (patch) | |
tree | 41cfe46585f6d42a2f9cbf6783b8dd94d545ced5 /net | |
parent | 7bc0f28c7a0cd19f40e5a6e4d0a117db9a4e4cd5 (diff) | |
download | op-kernel-dev-200c5a3b387c415e49639ee0f6de37804522b745.zip op-kernel-dev-200c5a3b387c415e49639ee0f6de37804522b745.tar.gz |
caif: Allow cfpkt_extr_head to process empty message
Allow NULL pointer in cfpkt_extr_head in order to
skip past header data.
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/caif/cfpkt_skbuff.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |