patch-2.2.12 linux/fs/exec.c

Next file: linux/fs/fat/inode.c
Previous file: linux/fs/dquot.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.11/linux/fs/exec.c linux/fs/exec.c
@@ -482,10 +482,10 @@
 		unsigned long set, i;
 
 		i = j * __NFDBITS;
-		if (i >= files->max_fds)
+		if (i >= files->max_fds || i >= files->max_fdset)
 			break;
-		set = files->close_on_exec.fds_bits[j];
-		files->close_on_exec.fds_bits[j] = 0;
+		set = files->close_on_exec->fds_bits[j];
+		files->close_on_exec->fds_bits[j] = 0;
 		j++;
 		for ( ; set ; i++,set >>= 1) {
 			if (set & 1)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)