diff options
author | Chen Gang <gang.chen@asianux.com> | 2013-03-20 06:26:09 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-23 17:37:18 +0400 |
commit | 1c3fc152b8ebadd59814767e3189c961b73f20c8 (patch) | |
tree | 49d9e586f83572c90d3cafaefb535536938c90ad /drivers | |
parent | 04e1ac04e54e420908c9ac3e09025f8266dcdf57 (diff) | |
download | linux-1c3fc152b8ebadd59814767e3189c961b73f20c8.tar.xz |
[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 <gang.chen@asianux.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/go7007/snd-go7007.c | 6 |
1 files 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; |