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/i2c | |
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/i2c')
-rw-r--r-- | sound/i2c/other/ak4xxx-adda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c index ed726d1569e8..f3735e64791c 100644 --- a/sound/i2c/other/ak4xxx-adda.c +++ b/sound/i2c/other/ak4xxx-adda.c | |||
@@ -583,7 +583,7 @@ static int ak4xxx_capture_source_info(struct snd_kcontrol *kcontrol, | |||
583 | if (idx >= num_names) | 583 | if (idx >= num_names) |
584 | return -EINVAL; | 584 | return -EINVAL; |
585 | input_names = ak->adc_info[mixer_ch].input_names; | 585 | input_names = ak->adc_info[mixer_ch].input_names; |
586 | strncpy(uinfo->value.enumerated.name, input_names[idx], | 586 | strlcpy(uinfo->value.enumerated.name, input_names[idx], |
587 | sizeof(uinfo->value.enumerated.name)); | 587 | sizeof(uinfo->value.enumerated.name)); |
588 | return 0; | 588 | return 0; |
589 | } | 589 | } |