media: go7007: Fix misuse of strscpy
authorJoe Perches <joe@perches.com>
Thu, 4 Jul 2019 23:57:44 +0000 (19:57 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 23 Jul 2019 12:53:08 +0000 (08:53 -0400)
Probable cut&paste typo - use the correct field size.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/go7007/snd-go7007.c

index 4a449c6..b05fa22 100644 (file)
@@ -253,7 +253,7 @@ int go7007_snd_init(struct go7007 *go)
                return ret;
        }
        strscpy(gosnd->card->driver, "go7007", sizeof(gosnd->card->driver));
-       strscpy(gosnd->card->shortname, go->name, sizeof(gosnd->card->driver));
+       strscpy(gosnd->card->shortname, go->name, sizeof(gosnd->card->shortname));
        strscpy(gosnd->card->longname, gosnd->card->shortname,
                sizeof(gosnd->card->longname));