Skip to content

Commit 51e6047

Browse files
github-actions[bot]carlossanlopkglambdageek
authored
[release/6.0] Fix null being passed to g_path_get_dirname when probing in wasm (#84740)
* [6.0-staging] Bump branding to 6.0.18 (#84596) * Fix null being passed to g_path_get_dirname when probing in wasm * Update src/mono/mono/metadata/native-library.c Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com> * Revert versioning changes brought from staging. --------- Co-authored-by: Carlos Sánchez López <1175054+carlossanlop@users.noreply.github.com> Co-authored-by: Katelyn Gadd <kg@luminance.org> Co-authored-by: Aleksey Kliger (λgeek) <akliger@gmail.com>
1 parent 066cc87 commit 51e6047

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/mono/mono/metadata/native-library.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ netcore_probe_for_module (MonoImage *image, const char *file_name, int flags)
529529
module = netcore_probe_for_module_variations (pinvoke_search_directories[i], file_name, lflags);
530530

531531
// Check the assembly directory if the search flag is set and the image exists
532-
if (flags & DLLIMPORTSEARCHPATH_ASSEMBLY_DIRECTORY && image != NULL && module == NULL) {
532+
if ((flags & DLLIMPORTSEARCHPATH_ASSEMBLY_DIRECTORY) != 0 && image != NULL &&
533+
module == NULL && (image->filename != NULL)) {
533534
char *mdirname = g_path_get_dirname (image->filename);
534535
if (mdirname)
535536
module = netcore_probe_for_module_variations (mdirname, file_name, lflags);

0 commit comments

Comments
 (0)