diff options
author | Peter Frühberger <Peter.Fruehberger@gmail.com> | 2023-09-19 21:59:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 21:59:31 +0200 |
commit | adb48f0b98d778d9d1b26e25d34deb5dc04d5248 (patch) | |
tree | 1fe9e319f1101e57a08b3aad24cc2d0c4ecfc884 | |
parent | 1e499e091f7950c70366d64ab2d8c4f3a18cfbfa (diff) | |
parent | f160d52babaac78404f7c4cc5d6bba19a835aaab (diff) |
Merge pull request #23716 from dobo90/fix_heap_use_after_free_in_CAESinkPipewire_EnumerateDevicesEx
[pipewire] Fix heap-use-after-free in AE::SINK::CAESinkPipewire::EnumerateDevicesEx
-rw-r--r-- | xbmc/cores/AudioEngine/Sinks/pipewire/PipewireGlobal.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/xbmc/cores/AudioEngine/Sinks/pipewire/PipewireGlobal.h b/xbmc/cores/AudioEngine/Sinks/pipewire/PipewireGlobal.h index 7b1021ae38..67f40c7220 100644 --- a/xbmc/cores/AudioEngine/Sinks/pipewire/PipewireGlobal.h +++ b/xbmc/cores/AudioEngine/Sinks/pipewire/PipewireGlobal.h @@ -29,21 +29,21 @@ public: CPipewireGlobal() = default; ~CPipewireGlobal(); - CPipewireGlobal& SetName(std::string_view name) + CPipewireGlobal& SetName(const std::string& name) { m_name = name; return *this; } - std::string_view GetName() const { return m_name; } + std::string GetName() const { return m_name; } - CPipewireGlobal& SetDescription(std::string_view description) + CPipewireGlobal& SetDescription(const std::string& description) { m_description = description; return *this; } - std::string_view GetDescription() const { return m_description; } + std::string GetDescription() const { return m_description; } CPipewireGlobal& SetID(uint32_t id) { @@ -61,13 +61,13 @@ public: uint32_t GetPermissions() const { return m_permissions; } - CPipewireGlobal& SetType(std::string_view type) + CPipewireGlobal& SetType(const std::string& type) { m_type = type; return *this; } - std::string_view GetType() const { return m_type; } + std::string GetType() const { return m_type; } CPipewireGlobal& SetVersion(uint32_t version) { @@ -95,11 +95,11 @@ public: CPipewireNode& GetNode() const { return *m_node; } private: - std::string_view m_name; - std::string_view m_description; + std::string m_name; + std::string m_description; uint32_t m_id; uint32_t m_permissions; - std::string_view m_type; + std::string m_type; uint32_t m_version; std::unique_ptr<pw_properties, PipewirePropertiesDeleter> m_properties; std::unique_ptr<CPipewireNode> m_node; |