Re: [PATCH] mt76: fix memcpy to potential null pointer on failed allocation

2017-12-14 Thread Felix Fietkau
On 2017-12-14 11:13, Colin King wrote: > From: Colin Ian King > > Currently if the allocation of skb fails and returns NULL then the > call to skb_put will cause a null pointer dereference. Fix this by > checking for a null skb and returning NULL. Note that calls to >

[PATCH] mt76: fix memcpy to potential null pointer on failed allocation

2017-12-14 Thread Colin King
From: Colin Ian King Currently if the allocation of skb fails and returns NULL then the call to skb_put will cause a null pointer dereference. Fix this by checking for a null skb and returning NULL. Note that calls to function mt76x2_mcu_msg_alloc don't directly check