drivers/staging/media/go7007: using strlcpy instead of strncpy
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/staging/media/go7007/snd-go7007.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/media/go7007/snd-go7007.c +3 -3
@@ -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;
Signature · 1 line
1.7.7.6