Re: [PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done

2018-12-11 Thread Alexander Aring
Hi Stefan, On Tue, Dec 11, 2018 at 09:26:37AM +0100, Stefan Schmidt wrote: > Hello Dave. > > On 11.12.18 07:01, David Miller wrote: > > From: YueHaibing > > Date: Tue, 11 Dec 2018 11:13:39 +0800 > > > >> gcc warning this: > >> > >> drivers/net/ieee802154/ca8210.c:730:10: warning: > >>

Re: [PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done

2018-12-11 Thread Stefan Schmidt
Hello. On 11.12.18 04:13, YueHaibing wrote: > gcc warning this: > > drivers/net/ieee802154/ca8210.c:730:10: warning: > comparison is always false due to limited range of data type [-Wtype-limits] > > 'len' is u8 type, we get it from buf[1] adding 2, which can overflow. > This patch change the

Re: [PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done

2018-12-11 Thread Stefan Schmidt
Hello Dave. On 11.12.18 07:01, David Miller wrote: > From: YueHaibing > Date: Tue, 11 Dec 2018 11:13:39 +0800 > >> gcc warning this: >> >> drivers/net/ieee802154/ca8210.c:730:10: warning: >> comparison is always false due to limited range of data type [-Wtype-limits] >> >> 'len' is u8 type, we

Re: [PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done

2018-12-10 Thread David Miller
From: YueHaibing Date: Tue, 11 Dec 2018 11:13:39 +0800 > gcc warning this: > > drivers/net/ieee802154/ca8210.c:730:10: warning: > comparison is always false due to limited range of data type [-Wtype-limits] > > 'len' is u8 type, we get it from buf[1] adding 2, which can overflow. > This patch

[PATCH net-next] ieee802154: ca8210: fix possible u8 overflow in ca8210_rx_done

2018-12-10 Thread YueHaibing
gcc warning this: drivers/net/ieee802154/ca8210.c:730:10: warning: comparison is always false due to limited range of data type [-Wtype-limits] 'len' is u8 type, we get it from buf[1] adding 2, which can overflow. This patch change the type of 'len' to unsigned int to avoid this,also fix the