aboutsummaryrefslogtreecommitdiffstats
path: root/ext.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext.c')
-rw-r--r--ext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext.c b/ext.c
index af6542d4..17ade95a 100644
--- a/ext.c
+++ b/ext.c
@@ -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)