summaryrefslogtreecommitdiff
path: root/net/caif
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>2011-11-30 09:22:46 +0000
committerDavid S. Miller <davem@davemloft.net>2011-11-30 23:30:47 -0500
commit200c5a3b387c415e49639ee0f6de37804522b745 (patch)
tree41cfe46585f6d42a2f9cbf6783b8dd94d545ced5 /net/caif
parent7bc0f28c7a0cd19f40e5a6e4d0a117db9a4e4cd5 (diff)
downloadlinux-3.10-200c5a3b387c415e49639ee0f6de37804522b745.tar.gz
linux-3.10-200c5a3b387c415e49639ee0f6de37804522b745.tar.bz2
linux-3.10-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')
-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 df08c47183d..de5390700cf 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;
}