aboutsummaryrefslogtreecommitdiffstats
path: root/net/caif
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>2011-11-30 04:22:46 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-30 23:30:47 -0500
commit200c5a3b387c415e49639ee0f6de37804522b745 (patch)
tree41cfe46585f6d42a2f9cbf6783b8dd94d545ced5 /net/caif
parent7bc0f28c7a0cd19f40e5a6e4d0a117db9a4e4cd5 (diff)
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.c3
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)
144 } 144 }
145 from = skb_pull(skb, len); 145 from = skb_pull(skb, len);
146 from -= len; 146 from -= len;
147 memcpy(data, from, len); 147 if (data)
148 memcpy(data, from, len);
148 return 0; 149 return 0;
149} 150}
150 151