From 1c3fc152b8ebadd59814767e3189c961b73f20c8 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 19 Mar 2013 23:26:09 -0300 Subject: [PATCH] [media] drivers/staging/media/go7007: using strlcpy instead of strncpy for NUL terminated string, need always set 0 in the end. Signed-off-by: Chen Gang Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/go7007/snd-go7007.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/go7007/snd-go7007.c b/drivers/staging/media/go7007/snd-go7007.c index 5af29ff68bfd..6f6271ec558c 100644 --- a/drivers/staging/media/go7007/snd-go7007.c +++ b/drivers/staging/media/go7007/snd-go7007.c @@ -267,9 +267,9 @@ int go7007_snd_init(struct go7007 *go) kfree(gosnd); return ret; } - strncpy(gosnd->card->driver, "go7007", sizeof(gosnd->card->driver)); - strncpy(gosnd->card->shortname, go->name, sizeof(gosnd->card->driver)); - strncpy(gosnd->card->longname, gosnd->card->shortname, + strlcpy(gosnd->card->driver, "go7007", sizeof(gosnd->card->driver)); + strlcpy(gosnd->card->shortname, go->name, sizeof(gosnd->card->driver)); + strlcpy(gosnd->card->longname, gosnd->card->shortname, sizeof(gosnd->card->longname)); gosnd->pcm->private_data = go; -- 2.20.1