lkml.org 
[lkml]   [2019]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/8] Input: synaptics: Fix misuse of strlcpy
On Thu, Jul 04, 2019 at 04:57:41PM -0700, Joe Perches wrote:
> Probable cut&paste typo - use the correct field size.

Applied, thank you.

Luckily both sizes (name and phys) are the same, so we need not to have
this in any of the stables.

>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/input/mouse/synaptics.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 1080c0c49815..00a0cf14f27f 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -705,7 +705,7 @@ static void synaptics_pt_create(struct psmouse *psmouse)
>
> serio->id.type = SERIO_PS_PSTHRU;
> strlcpy(serio->name, "Synaptics pass-through", sizeof(serio->name));
> - strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->name));
> + strlcpy(serio->phys, "synaptics-pt/serio0", sizeof(serio->phys));
> serio->write = synaptics_pt_write;
> serio->start = synaptics_pt_start;
> serio->stop = synaptics_pt_stop;
> --
> 2.15.0
>

--
Dmitry

\
 
 \ /
  Last update: 2019-07-14 20:31    [W:0.122 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site