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

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 ... > -

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 ... -

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 david.lai...@aculab.com 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