mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>
This commit is contained in:
parent
97f44f56ca
commit
57a4451d26
6 changed files with 8 additions and 8 deletions
|
|
@ -583,7 +583,7 @@ static int ak4xxx_capture_source_info(struct snd_kcontrol *kcontrol,
|
|||
if (idx >= num_names)
|
||||
return -EINVAL;
|
||||
input_names = ak->adc_info[mixer_ch].input_names;
|
||||
strncpy(uinfo->value.enumerated.name, input_names[idx],
|
||||
strlcpy(uinfo->value.enumerated.name, input_names[idx],
|
||||
sizeof(uinfo->value.enumerated.name));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue