OSDN Git Service
(root)
/
android-x86
/
external-alsa-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
762dd6b
)
Fixed buffer overflow spotted by Henrik
author
Abramo Bagnara
<abramo@alsa-project.org>
Mon, 28 Aug 2000 06:33:08 +0000
(06:33 +0000)
committer
Abramo Bagnara
<abramo@alsa-project.org>
Mon, 28 Aug 2000 06:33:08 +0000
(06:33 +0000)
amixer/amixer.c
patch
|
blob
|
history
diff --git
a/amixer/amixer.c
b/amixer/amixer.c
index
646f0a9
..
e938cde
100644
(file)
--- a/
amixer/amixer.c
+++ b/
amixer/amixer.c
@@
-178,8
+178,8
@@
static snd_mixer_sid_t __simple_id ATTRIBUTE_UNUSED;
static char *simple_name(const char *name, char *result)
{
- strncpy(result, name, simple_name_size);
- result[simple_name_size] = '\0';
+ strncpy(result, name, simple_name_size
- 1
);
+ result[simple_name_size
- 1
] = '\0';
return result;
}