Fix check in fix_libc_name to trigger only for libc, not or other names with same...
authorFilip Navara <navara@emclient.com>
Tue, 8 Oct 2019 11:06:38 +0000 (13:06 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 8 Oct 2019 11:06:38 +0000 (13:06 +0200)
See https://github.com/mono/mono/pull/17210#pullrequestreview-298663220

Commit migrated from https://github.com/mono/mono/commit/e8ed2494ca4af4d64706ac3ab06ba405391977c6

src/mono/mono/utils/mono-dl.c

index 33d2926..6254b64 100644 (file)
@@ -152,7 +152,7 @@ get_dl_name_from_libtool (const char *libtool_file)
 static const char *
 fix_libc_name (const char *name)
 {
-       if (strncmp (name, "libc", 4) == 0) {
+       if (strcmp (name, "libc") == 0) {
                // Taken from CoreCLR: https://github.com/dotnet/coreclr/blob/6b0dab793260d36e35d66c82678c63046828d01b/src/pal/src/loader/module.cpp#L568-L576
 #if defined (HOST_DARWIN)
                return "/usr/lib/libc.dylib";