Re: [PATCH v2] staging: android: ion: Replace strncpy() for stracpy()

2019-09-11 Thread kbuild test robot
Hi Adam, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc8 next-20190904] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Adam-

Re: [PATCH v4] Staging: exfat: avoid use of strcpy

2019-09-11 Thread Dan Carpenter
No worries... We all have days like that occasionally. :P regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH v4] Staging: exfat: avoid use of strcpy

2019-09-11 Thread Sandro Volery
> On 11 Sep 2019, at 21:06, Dan Carpenter wrote: > > On Wed, Sep 11, 2019 at 09:53:03PM +0200, Sandro Volery wrote: >> diff --git a/drivers/staging/exfat/exfat_core.c >> b/drivers/staging/exfat/exfat_core.c >> index da8c58149c35..4336fee444ce 100644 >> --- a/drivers/staging/exfat/exfat_core.c

Re: [PATCH v4] Staging: exfat: avoid use of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 09:53:03PM +0200, Sandro Volery wrote: > diff --git a/drivers/staging/exfat/exfat_core.c > b/drivers/staging/exfat/exfat_core.c > index da8c58149c35..4336fee444ce 100644 > --- a/drivers/staging/exfat/exfat_core.c > +++ b/drivers/staging/exfat/exfat_core.c > @@ -2960,18 +296

[PATCH v4] Staging: exfat: avoid use of strcpy

2019-09-11 Thread Sandro Volery
Replacing strcpy with strscpy and moving the length check to the same function. Suggested-by: Rasmus Villemoes Signed-off-by: Sandro Volery --- Took a couple attempts to finaly get this right :P v4: Replaced strlen check v3: Failed to replace check v2: Forgot to replace strlen check v1: origin

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
On Wed, Sep 11, 2019 at 08:24:22PM +0300, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 08:33:00PM +0530, Rohit Sarkar wrote: > > There are a lot of usages of "snprintf" throughout the staging > > directory (315 to be exact) > > Would it be worthwhile to find ones that may cause an information lea

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 08:33:00PM +0530, Rohit Sarkar wrote: > There are a lot of usages of "snprintf" throughout the staging > directory (315 to be exact) > Would it be worthwhile to find ones that may cause an information leak > and replace them with "scnprintf"? A lot of times it's really easy

[PATCH] staging: media: Fix alignment to match open parenthesis

2019-09-11 Thread Amol Grover
CHECK: Alignment should match open parenthesis Signed-off-by: Amol Grover --- drivers/staging/media/imx/imx-media-csi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 367e39f5b

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
On Wed, Sep 11, 2019 at 05:46:12PM +0300, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 07:55:43PM +0530, Rohit Sarkar wrote: > > On Wed, Sep 11, 2019 at 04:17:25PM +0200, Stefan Wahren wrote: > > > Hi Rohit, > > > > > > On 11.09.19 15:51, Rohit Sarkar wrote: > > > > When the number of bytes to b

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 07:55:43PM +0530, Rohit Sarkar wrote: > On Wed, Sep 11, 2019 at 04:17:25PM +0200, Stefan Wahren wrote: > > Hi Rohit, > > > > On 11.09.19 15:51, Rohit Sarkar wrote: > > > When the number of bytes to be printed exceeds the limit snprintf > > > returns the number of bytes that

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
On Wed, Sep 11, 2019 at 04:17:25PM +0200, Stefan Wahren wrote: > Hi Rohit, > > On 11.09.19 15:51, Rohit Sarkar wrote: > > When the number of bytes to be printed exceeds the limit snprintf > > returns the number of bytes that would have been printed (if there was > > no truncation). This might caus

Re: [PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Stefan Wahren
Hi Rohit, On 11.09.19 15:51, Rohit Sarkar wrote: > When the number of bytes to be printed exceeds the limit snprintf > returns the number of bytes that would have been printed (if there was > no truncation). This might cause issues, hence use scnprintf which > returns the actual number of bytes pr

[PATCH] staging: vhciq_core: replace snprintf with scnprintf

2019-09-11 Thread Rohit Sarkar
When the number of bytes to be printed exceeds the limit snprintf returns the number of bytes that would have been printed (if there was no truncation). This might cause issues, hence use scnprintf which returns the actual number of bytes printed to buffer always Signed-off-by: Rohit Sarkar ---

Re: [PATCH v3] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 02:48:12PM +0200, Sandro Volery wrote: > Use strscpy instead of strcpy in exfat_core.c, and add a check > for length that will return already known FFS_INVALIDPATH. > > Suggested-by: Rasmus Villemoes > Signed-off-by: Sandro Volery > --- > v3: Fixed replacing mistake > v2:

[PATCH v3] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Sandro Volery
Use strscpy instead of strcpy in exfat_core.c, and add a check for length that will return already known FFS_INVALIDPATH. Suggested-by: Rasmus Villemoes Signed-off-by: Sandro Volery --- v3: Fixed replacing mistake v2: Introduced length check v1: Original patch drivers/staging/exfat/exfat_core.c

Re: [PATCH] Staging: octeon: Avoid several usecases of strcpy

2019-09-11 Thread Rasmus Villemoes
On 11/09/2019 11.16, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 11:04:38AM +0200, Sandro Volery wrote: >> >> >>> On 11 Sep 2019, at 10:52, Dan Carpenter wrote: >>> >>> On Wed, Sep 11, 2019 at 08:23:59AM +0200, Sandro Volery wrote: strcpy was used multiple times in strcpy to write into de

Re: [PATCH v2 1/2] staging: rtl8192u: Add or remove spaces to fix style issues

2019-09-11 Thread Sumera Priyadarsini
On Tue, Sep 10, 2019 at 5:00 PM Dan Carpenter wrote: > > On Sun, Sep 08, 2019 at 12:58:39PM +0530, Sumera Priyadarsini wrote: > > Hi, I am extremely sorry for a late response to this. I was caught up > > with some laptop issues. I will send a separate patch making the > > change right away. > > Th

Re: [PATCH v2] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 12:24:23PM +0200, Sandro Volery wrote: > > > > On 11 Sep 2019, at 12:06, Dan Carpenter wrote: > > > > On Wed, Sep 11, 2019 at 11:42:19AM +0200, Sandro Volery wrote: > >> Use strscpy instead of strcpy in exfat_core.c, and add a check > >> for length that will return alre

Re: [PATCH v2] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Sandro Volery
> On 11 Sep 2019, at 12:06, Dan Carpenter wrote: > > On Wed, Sep 11, 2019 at 11:42:19AM +0200, Sandro Volery wrote: >> Use strscpy instead of strcpy in exfat_core.c, and add a check >> for length that will return already known FFS_INVALIDPATH. >> >> Suggested-by: Rasmus Villemoes >> Signed-o

Re: [PATCH] Staging: octeon: Avoid several usecases of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 11:21:44AM +0200, Sandro Volery wrote: > > On 11 Sep 2019, at 11:17, Dan Carpenter wrote: > > > > On Wed, Sep 11, 2019 at 11:04:38AM +0200, Sandro Volery wrote: > >> > >> > On 11 Sep 2019, at 10:52, Dan Carpenter wrote: > >>> > >>> On Wed, Sep 11, 2019 at 08:23

Re: [PATCH v2] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 11:42:19AM +0200, Sandro Volery wrote: > Use strscpy instead of strcpy in exfat_core.c, and add a check > for length that will return already known FFS_INVALIDPATH. > > Suggested-by: Rasmus Villemoes > Signed-off-by: Sandro Volery > --- > v2: Implement length check and re

[PATCH v2] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Sandro Volery
Use strscpy instead of strcpy in exfat_core.c, and add a check for length that will return already known FFS_INVALIDPATH. Suggested-by: Rasmus Villemoes Signed-off-by: Sandro Volery --- v2: Implement length check and return in one v1: Original Patch drivers/staging/exfat/exfat_core.c | 3 ++- 1

Re: [PATCH] Staging: octeon: Avoid several usecases of strcpy

2019-09-11 Thread Sandro Volery
On 11 Sep 2019, at 11:17, Dan Carpenter wrote: > > On Wed, Sep 11, 2019 at 11:04:38AM +0200, Sandro Volery wrote: >> >> On 11 Sep 2019, at 10:52, Dan Carpenter wrote: >>> >>> On Wed, Sep 11, 2019 at 08:23:59AM +0200, Sandro Volery wrote: strcpy was used multiple times in strcpy t

Re: [PATCH] Staging: octeon: Avoid several usecases of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 11:04:38AM +0200, Sandro Volery wrote: > > > > On 11 Sep 2019, at 10:52, Dan Carpenter wrote: > > > > On Wed, Sep 11, 2019 at 08:23:59AM +0200, Sandro Volery wrote: > >> strcpy was used multiple times in strcpy to write into dev->name. > >> I replaced them with strscpy.

Re: [PATCH] Staging: octeon: Avoid several usecases of strcpy

2019-09-11 Thread Sandro Volery
> On 11 Sep 2019, at 10:52, Dan Carpenter wrote: > > On Wed, Sep 11, 2019 at 08:23:59AM +0200, Sandro Volery wrote: >> strcpy was used multiple times in strcpy to write into dev->name. >> I replaced them with strscpy. >> >> Signed-off-by: Sandro Volery >> --- >> drivers/staging/octeon/ethern

Re: [PATCH] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Rasmus Villemoes
On 11/09/2019 10.41, Dan Carpenter wrote: > On Wed, Sep 11, 2019 at 07:57:49AM +0200, Sandro Volery wrote: >> Replaced strcpy with strscpy in exfat_core.c. >> >> Signed-off-by: Sandro Volery >> --- >> drivers/staging/exfat/exfat_core.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >

Re: [PATCH] Staging: octeon: Avoid several usecases of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 08:23:59AM +0200, Sandro Volery wrote: > strcpy was used multiple times in strcpy to write into dev->name. > I replaced them with strscpy. > > Signed-off-by: Sandro Volery > --- > drivers/staging/octeon/ethernet.c | 16 > 1 file changed, 8 insertions(+),

Re: [PATCH] Staging: exfat: Avoid use of strcpy

2019-09-11 Thread Dan Carpenter
On Wed, Sep 11, 2019 at 07:57:49AM +0200, Sandro Volery wrote: > Replaced strcpy with strscpy in exfat_core.c. > > Signed-off-by: Sandro Volery > --- > drivers/staging/exfat/exfat_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/exfat/exfat_core.c