Re: [PATCH v2] atmel: using strlcpy() to avoid possible buffer overflows

2 messages, 2 authors, 2018-07-03 · open the first message on its own page

Re: [PATCH v2] atmel: using strlcpy() to avoid possible buffer overflows

From: Kalle Valo <hidden>
Date: 2018-07-02 14:40:27

YueHaibing [off-list ref] writes:
'firmware' is a module param which may been longer than firmware_id,
so using strlcpy() to guard against overflows. Also priv is allocated
with zeroed memory,no need to set firmware_id[0] to '\0'.

v1 -> v2: remove priv->firmware_id[0] = '\0';

Signed-off-by: YueHaibing <redacted>
---
 drivers/net/wireless/atmel/atmel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
The changelog should be after "---" line. I can fix it this time, but in
the future please use the correct location.

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing

-- 
Kalle Valo

Re: [PATCH v2] atmel: using strlcpy() to avoid possible buffer overflows

From: YueHaibing <hidden>
Date: 2018-07-03 01:48:54

On 2018/7/2 22:40, Kalle Valo wrote:
YueHaibing [off-list ref] writes:
quoted
'firmware' is a module param which may been longer than firmware_id,
so using strlcpy() to guard against overflows. Also priv is allocated
with zeroed memory,no need to set firmware_id[0] to '\0'.

v1 -> v2: remove priv->firmware_id[0] = '\0';

Signed-off-by: YueHaibing <redacted>
---
 drivers/net/wireless/atmel/atmel.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
The changelog should be after "---" line. I can fix it this time, but in
the future please use the correct location.
Thank you,will notice it.
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#changelog_missing
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help