diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-10-29 10:26:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-10-29 10:26:12 -0400 |
commit | 57a4451d26eef4ccbf3b32fd116295f001c18cb4 (patch) | |
tree | d428b8eb301cc0a5125eb0af65eeb21b82255343 /sound/pci/rme9652 | |
parent | 97f44f56ca94709f45bc348f5d2c88696eae5f9b (diff) |
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/rme9652')
-rw-r--r-- | sound/pci/rme9652/hdspm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index 2907e68150cb..e98dc008de0b 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -6400,7 +6400,7 @@ static int snd_hdspm_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, | |||
6400 | memset(&hdspm_version, 0, sizeof(hdspm_version)); | 6400 | memset(&hdspm_version, 0, sizeof(hdspm_version)); |
6401 | 6401 | ||
6402 | hdspm_version.card_type = hdspm->io_type; | 6402 | hdspm_version.card_type = hdspm->io_type; |
6403 | strncpy(hdspm_version.cardname, hdspm->card_name, | 6403 | strlcpy(hdspm_version.cardname, hdspm->card_name, |
6404 | sizeof(hdspm_version.cardname)); | 6404 | sizeof(hdspm_version.cardname)); |
6405 | hdspm_version.serial = hdspm->serial; | 6405 | hdspm_version.serial = hdspm->serial; |
6406 | hdspm_version.firmware_rev = hdspm->firmware_rev; | 6406 | hdspm_version.firmware_rev = hdspm->firmware_rev; |