Skip to content

Commit

Permalink
Fix check in fix_libc_name to trigger only for libc, not or other nam…
Browse files Browse the repository at this point in the history
…es with same prefix (mono/mono#17222)

See mono/mono#17210 (review)

Commit migrated from mono/mono@e8ed249
  • Loading branch information
filipnavara authored and akoeplinger committed Oct 8, 2019
1 parent 829d743 commit 3769a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mono/mono/utils/mono-dl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 3769a03

Please sign in to comment.