Search Linux Wireless

Re: [PATCH 1/3] mt76: mt7615: 0-terminate firmware log messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-03-26 22:09, Johannes Berg wrote:
>> 
>> +	skb->data[skb->len] = 0;
>>  	wiphy_info(mt76_hw(dev)->wiphy, "%s: %s", type, data);
>>  }
>> 
> 
> Are you sure there's always enough space to write to the skb? Following
> the code up I'm not even sure it's always a linear skb :-)
> 
> Might be safer/better to do
> 
> 	wiphy_info(..., "%s: %*s", type, skb->len - sizeof(*rxd),
> data);
> 
> instead?
Maybe it does trust the firmware too much. I'll send a v2 based on your
suggestion.

Thanks,

- Felix




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux