artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ecbacb
)
Don't accept an empty string as selector value
author
ratchov
<ratchov@openbsd.org>
Sat, 25 Dec 2021 16:25:07 +0000
(16:25 +0000)
committer
ratchov
<ratchov@openbsd.org>
Sat, 25 Dec 2021 16:25:07 +0000
(16:25 +0000)
"looks good" edd@
usr.bin/sndioctl/sndioctl.c
patch
|
blob
|
history
diff --git
a/usr.bin/sndioctl/sndioctl.c
b/usr.bin/sndioctl/sndioctl.c
index
aa174e7
..
ffe0654
100644
(file)
--- a/
usr.bin/sndioctl/sndioctl.c
+++ b/
usr.bin/sndioctl/sndioctl.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: sndioctl.c,v 1.1
6 2021/03/03 09:40:43
ratchov Exp $ */
+/* $OpenBSD: sndioctl.c,v 1.1
7 2021/12/25 16:25:07
ratchov Exp $ */
/*
* Copyright (c) 2014-2020 Alexandre Ratchov <alex@caoua.org>
*
@@
-706,6
+706,11
@@
cmd(char *line)
}
break;
case SIOCTL_SEL:
+ if (*pos == '\0') {
+ fprintf(stderr, "%s.%s: expects value\n", astr, func);
+ exit(1);
+ }
+ /* FALLTROUGH */
case SIOCTL_VEC:
case SIOCTL_LIST:
for (i = g; i != NULL; i = nextpar(i)) {