mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-23 04:56:30 +01:00
Fixed buffer overflow spotted by Henrik
This commit is contained in:
parent
762dd6b564
commit
76702105ec
1 changed files with 2 additions and 2 deletions
|
@ -178,8 +178,8 @@ static snd_mixer_sid_t __simple_id ATTRIBUTE_UNUSED;
|
||||||
|
|
||||||
static char *simple_name(const char *name, char *result)
|
static char *simple_name(const char *name, char *result)
|
||||||
{
|
{
|
||||||
strncpy(result, name, simple_name_size);
|
strncpy(result, name, simple_name_size - 1);
|
||||||
result[simple_name_size] = '\0';
|
result[simple_name_size - 1] = '\0';
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue