diff options
author | ksooo <3226626+ksooo@users.noreply.github.com> | 2024-10-18 08:08:20 +0200 |
---|---|---|
committer | ksooo <3226626+ksooo@users.noreply.github.com> | 2024-10-18 08:34:06 +0200 |
commit | fe88fd5a9c7726f8ec596c20fc78e44bead9c2e7 (patch) | |
tree | 4cc53ab5db963b5136c3b628e5b5978156b7eea5 | |
parent | 410c628c828ba9941479391cd1f80452da3ac574 (diff) |
[PVR] CAddonTimer: Fix memory corruption caused by freed string data transferred to add-on.
-rw-r--r-- | xbmc/pvr/addons/PVRClient.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xbmc/pvr/addons/PVRClient.cpp b/xbmc/pvr/addons/PVRClient.cpp index 8d56392567..4e1fca84b9 100644 --- a/xbmc/pvr/addons/PVRClient.cpp +++ b/xbmc/pvr/addons/PVRClient.cpp @@ -269,7 +269,8 @@ public: prop.iKey = entry.first; prop.eType = entry.second.type; prop.iValue = entry.second.value.asInteger32(); - prop.strValue = entry.second.value.asString().c_str(); + m_customPropStringValues.emplace_back(entry.second.value.asString()); + prop.strValue = m_customPropStringValues.back().c_str(); ++idx; } customProps = m_customProps.get(); @@ -283,6 +284,7 @@ private: const std::string m_directory; const std::string m_summary; const std::string m_seriesLink; + std::vector<std::string> m_customPropStringValues; std::unique_ptr<PVR_SETTING_KEY_VALUE_PAIR[]> m_customProps; }; |