diff options
Diffstat (limited to 'ext.c')
-rw-r--r-- | ext.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -51,6 +51,9 @@ load_ext(const char *lib_name) if (do_traditional || do_posix) fatal(_("-l / @load are gawk extensions")); + if (lib_name == NULL) + fatal(_("load_ext: received NULL lib_name")); + if ((dl = dlopen(lib_name, flags)) == NULL) fatal(_("load_ext: cannot open library `%s' (%s)\n"), lib_name, dlerror()); @@ -60,6 +63,7 @@ load_ext(const char *lib_name) if (gpl_compat == NULL) fatal(_("load_ext: library `%s': does not define `plugin_is_GPL_compatible' (%s)\n"), lib_name, dlerror()); + install_func = (int (*)(const gawk_api_t *const, awk_ext_id_t)) dlsym(dl, INIT_FUNC); if (install_func == NULL) |