aboutsummaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-06-17 21:08:08 +0000
committerRoland McGrath <roland@gnu.org>2001-06-17 21:08:08 +0000
commit21bc421fb026fe05ecf80882d7698020ad0e336c (patch)
tree72414f3cb78e11a02e41f317131142ea66babae0 /hurd
parent5b60c9fcea1a200b8a0206211d58e4595e6b6558 (diff)
downloadglibc-21bc421fb026fe05ecf80882d7698020ad0e336c.zip
glibc-21bc421fb026fe05ecf80882d7698020ad0e336c.tar.gz
glibc-21bc421fb026fe05ecf80882d7698020ad0e336c.tar.bz2
2001-06-16 Roland McGrath <roland@frob.com>
* hurd/hurdexec.c (_hurd_exec): Be robust for DTABLESIZE==0.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurdexec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c
index 30a27e8..39d867a 100644
--- a/hurd/hurdexec.c
+++ b/hurd/hurdexec.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,96,97,99,2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -187,7 +187,7 @@ _hurd_exec (task_t task, file_t file,
}
/* Prune trailing null ports from the descriptor table. */
- while (dtable[dtablesize - 1] == MACH_PORT_NULL)
+ while (dtablesize > 0 && dtable[dtablesize - 1] == MACH_PORT_NULL)
--dtablesize;
/* The information is all set up now. Try to exec the file. */