diff options
author | mpp <mpp@FreeBSD.org> | 1996-01-15 09:11:17 +0000 |
---|---|---|
committer | mpp <mpp@FreeBSD.org> | 1996-01-15 09:11:17 +0000 |
commit | 1932d7e86d062e02f0158c3610dca5994e979129 (patch) | |
tree | 0dd904d093c2910581e4334c7de98c07edb77332 /usr.sbin/mixer | |
parent | 297db4d6f76e22d93e587a48e8ba9cc319d61a24 (diff) | |
download | FreeBSD-src-1932d7e86d062e02f0158c3610dca5994e979129.zip FreeBSD-src-1932d7e86d062e02f0158c3610dca5994e979129.tar.gz |
Fixed to not core dump if not enough arguments are given
with the +rec and -rec options.
Diffstat (limited to 'usr.sbin/mixer')
-rw-r--r-- | usr.sbin/mixer/mixer.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/mixer/mixer.c b/usr.sbin/mixer/mixer.c index 2ce07a0..ac60294 100644 --- a/usr.sbin/mixer/mixer.c +++ b/usr.sbin/mixer/mixer.c @@ -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(); |