diff options
author | sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> | 2011-11-30 10:22:46 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-01 05:30:47 +0100 |
commit | 200c5a3b387c415e49639ee0f6de37804522b745 (patch) | |
tree | 41cfe46585f6d42a2f9cbf6783b8dd94d545ced5 /net/caif/cfpkt_skbuff.c | |
parent | netem: rate extension (diff) | |
download | linux-200c5a3b387c415e49639ee0f6de37804522b745.tar.xz linux-200c5a3b387c415e49639ee0f6de37804522b745.zip |
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/cfpkt_skbuff.c')
-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; } |