Re: [PATCH RFC 1/6] net: rfkill: gpio: fix gpio name buffer size off by 1

2014-01-17 Thread Chen-Yu Tsai
On Fri, Jan 17, 2014 at 5:46 PM, David Laight wrote: > From: Chen-Yu Tsai >> snprintf should be passed the complete size of the buffer, including >> the space for '\0'. The previous code resulted in the *_reset and >> *_shutdown strings being truncated. > ... >> diff --git a/net/rfkill/rfkill-gpio

RE: [PATCH RFC 1/6] net: rfkill: gpio: fix gpio name buffer size off by 1

2014-01-17 Thread David Laight
From: Chen-Yu Tsai > snprintf should be passed the complete size of the buffer, including > the space for '\0'. The previous code resulted in the *_reset and > *_shutdown strings being truncated. ... > diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c ... > - snprintf(rfkill->res

[PATCH RFC 1/6] net: rfkill: gpio: fix gpio name buffer size off by 1

2014-01-16 Thread Chen-Yu Tsai
snprintf should be passed the complete size of the buffer, including the space for '\0'. The previous code resulted in the *_reset and *_shutdown strings being truncated. Signed-off-by: Chen-Yu Tsai --- net/rfkill/rfkill-gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi