mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added a table size check to guard against accesses beyond the last
file descriptor. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14886 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdio_fdhookentry.c,v 1.20 2005-03-12 09:43:48 obarthel Exp $
|
||||
* $Id: stdio_fdhookentry.c,v 1.21 2005-03-12 09:49:47 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -84,11 +84,11 @@ __fd_hook_entry(
|
||||
{
|
||||
file = Input();
|
||||
}
|
||||
else if (fd == __fd[STDOUT_FILENO])
|
||||
else if (__num_fd > STDOUT_FILENO && fd == __fd[STDOUT_FILENO])
|
||||
{
|
||||
file = Output();
|
||||
}
|
||||
else if (fd == __fd[STDERR_FILENO])
|
||||
else if (__num_fd > STDERR_FILENO && fd == __fd[STDERR_FILENO])
|
||||
{
|
||||
#if defined(__amigaos4__)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user