diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-31 10:03:46 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-31 11:06:00 +0100 |
commit | d71bfb961426279dbb4f943b33f4dab5f054be6d (patch) | |
tree | 49d014eda871285fec038a6fb708ad30fbe5505e /Userland | |
parent | be5311be99bc96cd23273ce4517b806783ee4492 (diff) | |
download | serenity-d71bfb961426279dbb4f943b33f4dab5f054be6d.zip |
LibC: Fix bad error check after open() in dlopen()
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibC/dlfcn.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/dlfcn.cpp b/Userland/Libraries/LibC/dlfcn.cpp index 5bbbaaacda..bcf6de70ae 100644 --- a/Userland/Libraries/LibC/dlfcn.cpp +++ b/Userland/Libraries/LibC/dlfcn.cpp @@ -78,7 +78,7 @@ void* dlopen(const char* filename, int flags) } int fd = open(filename, O_RDONLY); - if (!fd) { + if (fd < 0) { g_dlerror_msg = String::formatted("Unable to open file {}", filename); return nullptr; } |