playlist/flac: copy the URI to fix use-after-free bug

Closes https://github.com/MusicPlayerDaemon/MPD/issues/508
This commit is contained in:
Max Kellermann
2019-03-14 19:30:33 +01:00
parent 38f0c16904
commit 0d98677212
2 changed files with 3 additions and 1 deletions

View File

@@ -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;