]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
caif: Allow cfpkt_extr_head to process empty message
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>
Wed, 30 Nov 2011 09:22:46 +0000 (09:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2011 04:30:47 +0000 (23:30 -0500)
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>
net/caif/cfpkt_skbuff.c

index df08c47183d477b96bf26cb026043f17c1abcf64..de5390700cfe76725f6d9852c5303e935a08e510 100644 (file)
@@ -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;
 }