summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--svr-chansession.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index a040a47..1704c6e 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -837,7 +837,7 @@ static void execchild(struct ChanSess *chansess) {
/* close file descriptors except stdin/stdout/stderr
* Need to be sure FDs are closed here to avoid reading files as root */
- for (i = 3; i < (unsigned int)ses.maxfd; i++) {
+ for (i = 3; i <= (unsigned int)ses.maxfd; i++) {
if (m_close(i) == DROPBEAR_FAILURE) {
dropbear_exit("Error closing file desc");
}