Re: [PATCH 1/1] staging: rtl8723bs: make memcmp() calls consistent

2017-12-13 Thread Greg Kroah-Hartman
On Wed, Dec 13, 2017 at 03:49:12PM +0100, Hans de Goede wrote: > Hi, > > On 13-12-17 12:47, Greg Kroah-Hartman wrote: > > On Sun, Dec 10, 2017 at 08:35:12PM +0100, Nicolas Iooss wrote: > > > rtw_pm_set() uses memcmp() with 5-chars strings and a length of 4 when > > > parsing extra, and then parses

Re: [PATCH 1/1] staging: rtl8723bs: make memcmp() calls consistent

2017-12-13 Thread Hans de Goede
Hi, On 13-12-17 16:12, Rasmus Villemoes wrote: On 2017-12-13 15:49, Hans de Goede wrote: Hi, On 13-12-17 12:47, Greg Kroah-Hartman wrote: On Sun, Dec 10, 2017 at 08:35:12PM +0100, Nicolas Iooss wrote: rtw_pm_set() uses memcmp() with 5-chars strings and a length of 4 when parsing extra, and t

Re: [PATCH 1/1] staging: rtl8723bs: make memcmp() calls consistent

2017-12-13 Thread Rasmus Villemoes
On 2017-12-13 15:49, Hans de Goede wrote: > Hi, > > On 13-12-17 12:47, Greg Kroah-Hartman wrote: >> On Sun, Dec 10, 2017 at 08:35:12PM +0100, Nicolas Iooss wrote: >>> rtw_pm_set() uses memcmp() with 5-chars strings and a length of 4 when >>> parsing extra, and then parses extra+4 as an int: >>> >>

Re: [PATCH 1/1] staging: rtl8723bs: make memcmp() calls consistent

2017-12-13 Thread Hans de Goede
Hi, On 13-12-17 12:47, Greg Kroah-Hartman wrote: On Sun, Dec 10, 2017 at 08:35:12PM +0100, Nicolas Iooss wrote: rtw_pm_set() uses memcmp() with 5-chars strings and a length of 4 when parsing extra, and then parses extra+4 as an int: if (!memcmp(extra, "lps =", 4)) { sscanf(extra+

Re: [PATCH 1/1] staging: rtl8723bs: make memcmp() calls consistent

2017-12-13 Thread Greg Kroah-Hartman
On Sun, Dec 10, 2017 at 08:35:12PM +0100, Nicolas Iooss wrote: > rtw_pm_set() uses memcmp() with 5-chars strings and a length of 4 when > parsing extra, and then parses extra+4 as an int: > > if (!memcmp(extra, "lps =", 4)) { > sscanf(extra+4, "%u", &mode); > /* ... */ > } else

[PATCH 1/1] staging: rtl8723bs: make memcmp() calls consistent

2017-12-10 Thread Nicolas Iooss
rtw_pm_set() uses memcmp() with 5-chars strings and a length of 4 when parsing extra, and then parses extra+4 as an int: if (!memcmp(extra, "lps =", 4)) { sscanf(extra+4, "%u", &mode); /* ... */ } else if (!memcmp(extra, "ips =", 4)) { sscanf(extra+4, "%u", &mode); The