NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/58425 CVS commit: src
The following reply was made to PR kern/58425; it has been noted by GNATS.
From: "Robert Elz" <kre%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/58425 CVS commit: src
Date: Sun, 14 Jul 2024 05:10:40 +0000
Module Name: src
Committed By: kre
Date: Sun Jul 14 05:10:40 UTC 2024
Modified Files:
src/lib/libc/compat-43: killpg.c
src/sys/kern: kern_descrip.c kern_ktrace.c kern_proc.c sys_sig.c tty.c
Log Message:
PR kern/58425 -- Disallow INT_MIN as a (negative) pid arg.
Since -INT_MIN is undefined, and to point of negative pid args is
to negate them, and use the result as a pgrp id instead, we need
to avoid accidentally negating INT_MIN.
Since pid_t is just an integral type, of unspecified width, when
testing pid_t value test for <= INT_MIN (or > INT_MIN sometimes)
rather than == INT_MIN. When testing int values, just == INT_MIN
is all that is needed, < INT_MIN cannot occur.
XXX pullup -9, -10
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/compat-43/killpg.c
cvs rdiff -u -r1.262 -r1.263 src/sys/kern/kern_descrip.c
cvs rdiff -u -r1.184 -r1.185 src/sys/kern/kern_ktrace.c
cvs rdiff -u -r1.275 -r1.276 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.57 -r1.58 src/sys/kern/sys_sig.c
cvs rdiff -u -r1.312 -r1.313 src/sys/kern/tty.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index