13
0

Fix crash when loading LV2 plugins with a corrupt LV2_Descriptor::extension_data.

This is a plugin bug, but Ardour is supposed to check using the data as well.

git-svn-id: svn://localhost/ardour2/branches/3.0@13777 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2013-01-04 18:46:39 +00:00
parent e2711af723
commit d50b026da4

View File

@ -368,8 +368,12 @@ LV2Plugin::init(const void* c_plugin, framecnt_t rate)
_data_access_extension_data.extension_data = _impl->instance->lv2_descriptor->extension_data; _data_access_extension_data.extension_data = _impl->instance->lv2_descriptor->extension_data;
_data_access_feature.data = &_data_access_extension_data; _data_access_feature.data = &_data_access_extension_data;
_impl->work_iface = (const LV2_Worker_Interface*)extension_data( LilvNode* worker_iface_uri = lilv_new_uri(_world.world, LV2_WORKER__interface);
LV2_WORKER__interface); if (lilv_plugin_has_extension_data(plugin, worker_iface_uri)) {
_impl->work_iface = (const LV2_Worker_Interface*)extension_data(
LV2_WORKER__interface);
}
lilv_node_free(worker_iface_uri);
if (lilv_plugin_has_feature(plugin, _world.lv2_inPlaceBroken)) { if (lilv_plugin_has_feature(plugin, _world.lv2_inPlaceBroken)) {
error << string_compose( error << string_compose(