diff options
author | 2017-05-07 15:19:32 +0000 | |
---|---|---|
committer | 2017-05-07 15:19:32 +0000 | |
commit | 29e4a4d4eb6c60e74b36b04733ea283a047fd140 (patch) | |
tree | 3fbaf376f53788e51afa3854fb6502a56298d824 /lib/libc | |
parent | Program hardware address in dwc_gmac_init() instead of dwc_gmac_attach() (diff) | |
download | wireguard-openbsd-29e4a4d4eb6c60e74b36b04733ea283a047fd140.tar.xz wireguard-openbsd-29e4a4d4eb6c60e74b36b04733ea283a047fd140.zip |
Don't allow a negative process group ID, it would turn into a
process ID when negated.
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/compat-43/killpg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/compat-43/killpg.c b/lib/libc/compat-43/killpg.c index 75b1ad98a8d..3506b8e2b44 100644 --- a/lib/libc/compat-43/killpg.c +++ b/lib/libc/compat-43/killpg.c @@ -37,7 +37,7 @@ int killpg(pid_t pgid, int sig) { - if (pgid == 1) { + if (pgid < 0 || pgid == 1) { errno = ESRCH; return (-1); } |