diff options
Diffstat (limited to 'src/seq/seq.c')
-rw-r--r-- | src/seq/seq.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/seq/seq.c b/src/seq/seq.c index 1596b32f..1fa300a3 100644 --- a/src/seq/seq.c +++ b/src/seq/seq.c @@ -129,10 +129,14 @@ static int snd_seq_open_conf(snd_seq_t **seqp, const char *name, open_name = buf; snprintf(buf, sizeof(buf), "_snd_seq_%s_open", str); } - if (!lib) - lib = ALSA_LIB; h = dlopen(lib, RTLD_NOW); - open_func = h ? dlsym(h, open_name) : NULL; + if (h) { + if ((err = snd_dlsym_verify(h, open_name, SND_DLSYM_VERSION(SND_SEQ_DLSYM_VERSION))) < 0) { + dlclose(h); + goto _err; + } + open_func = dlsym(h, open_name); + } err = 0; if (!h) { SNDERR("Cannot open shared library %s", lib); |