aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-open.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-open.c')
-rw-r--r--elf/dl-open.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 9bbbee80f7..8cf1084a94 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -154,6 +154,10 @@ _dl_open (const char *file, int mode)
char *errstring;
int errcode;
+ if ((mode & RTLD_BINDING_MASK) == 0)
+ /* One of the flags must be set. */
+ _dl_signal_error (EINVAL, file, _("invalid mode for dlopen()"));
+
/* Make sure we are alone. */
__libc_lock_lock (_dl_load_lock);