[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>
This commit is contained in:
parent
04e1ac04e5
commit
1c3fc152b8
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user