svn commit: r273458 - head/sys/kern
Mateusz Guzik
mjg at FreeBSD.org
Wed Oct 22 08:56:58 UTC 2014
Author: mjg
Date: Wed Oct 22 08:56:57 2014
New Revision: 273458
URL: https://svnweb.freebsd.org/changeset/base/273458
Log:
filedesc assert that table size is at least 3 in fdsetugidsafety
Requested by: kib
Modified:
head/sys/kern/kern_descrip.c
Modified: head/sys/kern/kern_descrip.c
==============================================================================
--- head/sys/kern/kern_descrip.c Wed Oct 22 08:54:10 2014 (r273457)
+++ head/sys/kern/kern_descrip.c Wed Oct 22 08:56:57 2014 (r273458)
@@ -2102,6 +2102,7 @@ fdsetugidsafety(struct thread *td)
fdp = td->td_proc->p_fd;
KASSERT(fdp->fd_refcnt == 1, ("the fdtable should not be shared"));
+ MPASS(fdp->fd_nfiles >= 3);
for (i = 0; i <= 2; i++) {
fp = fdp->fd_ofiles[i].fde_file;
if (fp != NULL && is_unsafe(fp)) {
More information about the svn-src-all
mailing list