diff options
author | sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> | 2011-11-30 13:22:46 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-01 08:30:47 +0400 |
commit | 200c5a3b387c415e49639ee0f6de37804522b745 (patch) | |
tree | 41cfe46585f6d42a2f9cbf6783b8dd94d545ced5 /net/caif | |
parent | 7bc0f28c7a0cd19f40e5a6e4d0a117db9a4e4cd5 (diff) | |
download | linux-200c5a3b387c415e49639ee0f6de37804522b745.tar.xz |
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/caif')
-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 df08c47183d4..de5390700cfe 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; } |