mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
* descriptors.cc (Descriptors::open): Check that the options are
valid before using them.
This commit is contained in:
parent
16ad93705c
commit
604399204f
@ -1,3 +1,8 @@
|
||||
2009-03-19 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* descriptors.cc (Descriptors::open): Check that the options are
|
||||
valid before using them.
|
||||
|
||||
2009-03-18 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
* script-sections.h: Include <list>.
|
||||
|
@ -130,7 +130,9 @@ Descriptors::open(int descriptor, const char* name, int flags, int mode)
|
||||
// header file but not supported by the kernel.
|
||||
// Unfortunately there doesn't seem to be any obvious way to
|
||||
// detect that, as unknown flags passed to open are ignored.
|
||||
if (O_CLOEXEC == 0 && parameters->options().has_plugins())
|
||||
if (O_CLOEXEC == 0
|
||||
&& parameters->options_valid()
|
||||
&& parameters->options().has_plugins())
|
||||
fcntl(new_descriptor, F_SETFD, FD_CLOEXEC);
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user