diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-29 15:26:12 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-29 15:26:12 +0100 |
commit | 57a4451d26eef4ccbf3b32fd116295f001c18cb4 (patch) | |
tree | d428b8eb301cc0a5125eb0af65eeb21b82255343 /sound/pci/ice1712/wm8776.c | |
parent | ALSA: Limit the fallback card id string size (diff) | |
download | linux-57a4451d26eef4ccbf3b32fd116295f001c18cb4.tar.xz linux-57a4451d26eef4ccbf3b32fd116295f001c18cb4.zip |
ALSA: Use strlcpy() instead of strncpy()
We tend to make stupid mistakes with strncpy(). Let's take a safer
one, strlcpy().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/wm8776.c')
-rw-r--r-- | sound/pci/ice1712/wm8776.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/ice1712/wm8776.c b/sound/pci/ice1712/wm8776.c index a3c05fe5daf9..5227cb08247f 100644 --- a/sound/pci/ice1712/wm8776.c +++ b/sound/pci/ice1712/wm8776.c @@ -52,7 +52,7 @@ static void snd_wm8776_activate_ctl(struct snd_wm8776 *wm, unsigned int index_offset; memset(&elem_id, 0, sizeof(elem_id)); - strncpy(elem_id.name, ctl_name, sizeof(elem_id.name)); + strlcpy(elem_id.name, ctl_name, sizeof(elem_id.name)); elem_id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; kctl = snd_ctl_find_id(card, &elem_id); if (!kctl) |