mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 19:08:58 +00:00
Fixed to not core dump if not enough arguments are given
with the +rec and -rec options.
This commit is contained in:
parent
9c437f50ee
commit
d1968b90c7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13435
@ -99,6 +99,10 @@ main(int argc, char *argv[])
|
||||
if (foo >= SOUND_MIXER_NRDEVICES) {
|
||||
|
||||
if (!strcmp("+rec", argv[1]) || !strcmp("-rec", argv[1])) {
|
||||
if (argc != 3) {
|
||||
usage();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
for (dev = 0; dev < SOUND_MIXER_NRDEVICES && strcmp(names[dev], argv[2]); dev++);
|
||||
if (dev >= SOUND_MIXER_NRDEVICES)
|
||||
usage();
|
||||
|
Loading…
Reference in New Issue
Block a user