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>
This commit is contained in:
parent
7bc0f28c7a
commit
200c5a3b38
|
@ -144,6 +144,7 @@ int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len)
|
||||||
}
|
}
|
||||||
from = skb_pull(skb, len);
|
from = skb_pull(skb, len);
|
||||||
from -= len;
|
from -= len;
|
||||||
|
if (data)
|
||||||
memcpy(data, from, len);
|
memcpy(data, from, len);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue