summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-03-14 19:30:33 +0100
committerMax Kellermann <max@musicpd.org>2019-03-14 19:30:33 +0100
commit0d98677212f7d4b1308f140b8979d32c6a96aad6 (patch)
tree4175a9c570a676be436eb7d6f148c6efe528b0f6 /src
parent38f0c169048f08823e6138d91b4569a928de6faa (diff)
playlist/flac: copy the URI to fix use-after-free bug
Closes https://github.com/MusicPlayerDaemon/MPD/issues/508
Diffstat (limited to 'src')
-rw-r--r--src/playlist/plugins/FlacPlaylistPlugin.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/playlist/plugins/FlacPlaylistPlugin.cxx b/src/playlist/plugins/FlacPlaylistPlugin.cxx
index cdaada6ae..c16b9d674 100644
--- a/src/playlist/plugins/FlacPlaylistPlugin.cxx
+++ b/src/playlist/plugins/FlacPlaylistPlugin.cxx
@@ -34,7 +34,7 @@
#include <FLAC/metadata.h>
class FlacPlaylist final : public SongEnumerator {
- const char *const uri;
+ const std::string uri;
FLAC__StreamMetadata *const cuesheet;
const unsigned sample_rate;