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/rme9652 | |
parent | 97f44f56ca94709f45bc348f5d2c88696eae5f9b (diff) | |
download | op-kernel-dev-57a4451d26eef4ccbf3b32fd116295f001c18cb4.zip op-kernel-dev-57a4451d26eef4ccbf3b32fd116295f001c18cb4.tar.gz |
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 2907e68..e98dc00 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, memset(&hdspm_version, 0, sizeof(hdspm_version)); hdspm_version.card_type = hdspm->io_type; - strncpy(hdspm_version.cardname, hdspm->card_name, + strlcpy(hdspm_version.cardname, hdspm->card_name, sizeof(hdspm_version.cardname)); hdspm_version.serial = hdspm->serial; hdspm_version.firmware_rev = hdspm->firmware_rev; |