projects
/
platform
/
upstream
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4fdd4b
)
2004-09-06 Roland McGrath <roland@frob.com>
author
Roland McGrath
<roland@gnu.org>
Mon, 6 Sep 2004 21:31:38 +0000
(21:31 +0000)
committer
Roland McGrath
<roland@gnu.org>
Mon, 6 Sep 2004 21:31:38 +0000
(21:31 +0000)
* sysdeps/mach/hurd/dl-sysdep.c (__writev): Does use assert on FD
validity, since __assert_fail gets to here anyway. Just fail.
sysdeps/mach/hurd/dl-sysdep.c
patch
|
blob
|
history
diff --git
a/sysdeps/mach/hurd/dl-sysdep.c
b/sysdeps/mach/hurd/dl-sysdep.c
index
c9fe5fc
..
668aaaf
100644
(file)
--- a/
sysdeps/mach/hurd/dl-sysdep.c
+++ b/
sysdeps/mach/hurd/dl-sysdep.c
@@
-401,13
+401,17
@@
libc_hidden_weak (__libc_write)
__ssize_t weak_function
__writev (int fd, const struct iovec *iov, int niov)
{
+ if (fd >= _hurd_init_dtablesize)
+ {
+ errno = EBADF;
+ return -1;
+ }
+
int i;
size_t total = 0;
for (i = 0; i < niov; ++i)
total += iov[i].iov_len;
- assert (fd < _hurd_init_dtablesize);
-
if (total != 0)
{
char buf[total], *bufp = buf;