From: gnezdo Date: Mon, 20 Feb 2023 00:51:57 +0000 (+0000) Subject: Adjust inline !libc check to match the intent in ld.so X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8cef549711c0d46f2433530f30b6e5ec60029c02;p=openbsd Adjust inline !libc check to match the intent in ld.so right, deraadt@ --- diff --git a/libexec/ld.so/loader.c b/libexec/ld.so/loader.c index 1413f4380eb..99d9f6cdbe6 100644 --- a/libexec/ld.so/loader.c +++ b/libexec/ld.so/loader.c @@ -1,4 +1,4 @@ -/* $OpenBSD: loader.c,v 1.211 2023/02/18 01:22:50 deraadt Exp $ */ +/* $OpenBSD: loader.c,v 1.212 2023/02/20 00:51:57 gnezdo Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -415,7 +415,7 @@ _dl_load_dep_libs(elf_object_t *object, int flags, int booting) char *soname = (char *)obj->Dyn.info[DT_SONAME]; struct sym_res sr; - if (soname && _dl_strncmp(soname, "libc.so.", 8)) + if (!soname || _dl_strncmp(soname, "libc.so.", 8)) continue; sr = _dl_find_symbol("execve", SYM_SEARCH_SELF|SYM_PLT|SYM_WARNNOTFOUND, NULL, obj);