mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
ladspa plugin - SIGSEGV fix when label is not specified
This commit is contained in:
parent
1f231e2e1a
commit
aa21cf4d7c
1 changed files with 13 additions and 11 deletions
|
|
@ -1100,18 +1100,20 @@ static int snd_pcm_ladspa_check_file(snd_pcm_ladspa_plugin_t * const plugin,
|
||||||
#else
|
#else
|
||||||
char *labellocale;
|
char *labellocale;
|
||||||
struct lconv *lc;
|
struct lconv *lc;
|
||||||
lc = localeconv ();
|
if (label != NULL) {
|
||||||
labellocale = malloc (strlen (label) + 1);
|
lc = localeconv ();
|
||||||
if (labellocale == NULL)
|
labellocale = malloc (strlen (label) + 1);
|
||||||
return -ENOMEM;
|
if (labellocale == NULL)
|
||||||
strcpy (labellocale, label);
|
return -ENOMEM;
|
||||||
if (strrchr(labellocale, '.'))
|
strcpy (labellocale, label);
|
||||||
*strrchr (labellocale, '.') = *lc->decimal_point;
|
if (strrchr(labellocale, '.'))
|
||||||
if (strcmp(label, d->Label) && strcmp(labellocale, d->Label)) {
|
*strrchr (labellocale, '.') = *lc->decimal_point;
|
||||||
free(labellocale);
|
if (strcmp(label, d->Label) && strcmp(labellocale, d->Label)) {
|
||||||
continue;
|
free(labellocale);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
free (labellocale);
|
||||||
}
|
}
|
||||||
free (labellocale);
|
|
||||||
#endif
|
#endif
|
||||||
if (ladspa_id > 0 && d->UniqueID != ladspa_id)
|
if (ladspa_id > 0 && d->UniqueID != ladspa_id)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue