Skip to content
Browse files

Don't crash if trying to load an unrecognized DLL

Fixed a bug in erts_sys_ddll_open2 where it didn't initialize the error message string when returning failure, causing the caller to then dereference a garbage string pointer.
  • Loading branch information...
1 parent b6c457b commit 4e9fa595270ce32fa6ca78b8e02e2aa54bcc417e @snej snej committed Aug 1, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/emulator/sys/unix/erl_unix_sys_ddll.c
View
1 src/emulator/sys/unix/erl_unix_sys_ddll.c
@@ -117,6 +117,7 @@ int erts_sys_ddll_open2(char *full_name, void **handle, ErtsSysDdllError* err)
*handle = (void*) 3;
return ERL_DE_NO_ERROR;
}
+ err->str = my_strdup_in(ERTS_ALC_T_DDLL_TMP_BUF,"Cannot load DLLs on iOS");
return ERL_DE_ERROR_NO_DDLL_FUNCTIONALITY;
}

0 comments on commit 4e9fa59

Please sign in to comment.
Something went wrong with that request. Please try again.