Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6:Update
lsp-plugins
01-Fixed-double-free-of-generated-port-metadata...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 01-Fixed-double-free-of-generated-port-metadata.patch of Package lsp-plugins
From 4975f943c743eadba745d1c84c1aa2bda67c64f8 Mon Sep 17 00:00:00 2001 From: Vladimir Sadovnikov <sadko4u@gmail.com> Date: Thu, 28 Sep 2023 20:06:12 +0300 Subject: [PATCH] Fixed double free of generated port metadata --- CHANGELOG | 1 + include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h | 10 +++++++--- .../lsp-plug.in/plug-fw/wrap/jack/impl/ui_wrapper.h | 5 +++-- include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h | 5 +++-- include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h | 4 ++-- include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h | 4 ++-- include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h | 10 ++++++---- include/lsp-plug.in/plug-fw/wrap/vst2/impl/wrapper.h | 6 ++++-- 8 files changed, 28 insertions(+), 17 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a315d397..d71f975f 100644 diff --git a/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h index 9928ae34..a5c55302 100644 --- a/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/clap/impl/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2022 Linux Studio Plugins Project <https://lsp-plug.in/> - * (C) 2022 Vladimir Sadovnikov <sadko4u@gmail.com> + * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> + * (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> * * This file is part of lsp-plugin-fw * Created on: 24 дек. 2022 г. @@ -110,7 +110,11 @@ namespace lsp // Cleanup generated metadata for (size_t i=0, n=vGenMetadata.size(); i<n; ++i) - meta::drop_port_metadata(vGenMetadata.uget(i)); + { + meta::port_t *p = vGenMetadata.uget(i); + lsp_trace("destroy generated port metadata %p", p); + meta::drop_port_metadata(p); + } vGenMetadata.flush(); // Destroy the loader diff --git a/include/lsp-plug.in/plug-fw/wrap/jack/impl/ui_wrapper.h b/include/lsp-plug.in/plug-fw/wrap/jack/impl/ui_wrapper.h index 397fec3b..81c84cda 100644 --- a/include/lsp-plug.in/plug-fw/wrap/jack/impl/ui_wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/jack/impl/ui_wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2022 Linux Studio Plugins Project <https://lsp-plug.in/> - * (C) 2022 Vladimir Sadovnikov <sadko4u@gmail.com> + * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> + * (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> * * This file is part of lsp-plugin-fw * Created on: 31 янв. 2022 г. @@ -151,6 +151,7 @@ namespace lsp lsp_trace("destroy generated UI port metadata %p", port); meta::drop_port_metadata(port); } + vGenMetadata.flush(); // Destroy the display if (pDisplay != NULL) diff --git a/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h index be97b9e3..96a23760 100644 --- a/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/jack/impl/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2022 Linux Studio Plugins Project <https://lsp-plug.in/> - * (C) 2022 Vladimir Sadovnikov <sadko4u@gmail.com> + * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> + * (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> * * This file is part of lsp-plugin-fw * Created on: 31 янв. 2022 г. @@ -466,6 +466,7 @@ namespace lsp // lsp_trace("destroy generated port metadata %p", port); meta::drop_port_metadata(port); } + vGenMetadata.flush(); // Clear all other port containers vDataPorts.flush(); diff --git a/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h index 78d3dfdc..7c0b49d3 100644 --- a/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/ladspa/impl/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/> - * (C) 2021 Vladimir Sadovnikov <sadko4u@gmail.com> + * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> + * (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> * * This file is part of lsp-plugin-fw * Created on: 26 янв. 2022 г. diff --git a/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h index 97236bc7..e15bf40e 100644 --- a/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/ladspa/wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/> - * (C) 2021 Vladimir Sadovnikov <sadko4u@gmail.com> + * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> + * (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> * * This file is part of lsp-plugin-fw * Created on: 1 нояб. 2021 г. diff --git a/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h b/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h index 98973f1d..2b377ab5 100644 --- a/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/lv2/impl/ui_wrapper.h @@ -1,6 +1,6 @@ /* - * Copyright (C) 2021 Linux Studio Plugins Project <https://lsp-plug.in/> - * (C) 2021 Vladimir Sadovnikov <sadko4u@gmail.com> + * Copyright (C) 2023 Linux Studio Plugins Project <https://lsp-plug.in/> + * (C) 2023 Vladimir Sadovnikov <sadko4u@gmail.com> * * This file is part of lsp-plugin-fw * Created on: 24 нояб. 2021 г. @@ -155,9 +155,11 @@ namespace lsp // Cleanup generated metadata for (size_t i=0; i<vGenMetadata.size(); ++i) { - lsp_trace("destroy generated port metadata %p", vGenMetadata[i]); - drop_port_metadata(vGenMetadata[i]); + meta::port_t *p = vGenMetadata.uget(i); + lsp_trace("destroy generated port metadata %p", p); + drop_port_metadata(p); } + vGenMetadata.flush(); vExtPorts.flush(); vMeshPorts.flush(); diff --git a/include/lsp-plug.in/plug-fw/wrap/vst2/impl/wrapper.h b/include/lsp-plug.in/plug-fw/wrap/vst2/impl/wrapper.h index 8c2afeae..c6c55d1d 100644 --- a/include/lsp-plug.in/plug-fw/wrap/vst2/impl/wrapper.h +++ b/include/lsp-plug.in/plug-fw/wrap/vst2/impl/wrapper.h @@ -195,9 +195,11 @@ namespace lsp // Cleanup generated metadata for (size_t i=0; i<vGenMetadata.size(); ++i) { - lsp_trace("destroy generated port metadata %p", vGenMetadata[i]); - drop_port_metadata(vGenMetadata[i]); + meta::port_t *p = vGenMetadata.uget(i); + lsp_trace("destroy generated port metadata %p", p); + drop_port_metadata(p); } + vGenMetadata.flush(); // Destroy manifest if (pPackage != NULL)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor