Commit 139122c5 authored by Max Kellermann's avatar Max Kellermann

Merge branch 'v0.18.x'

parents 959d7ca9 fdd76b34
...@@ -15,7 +15,10 @@ ver 0.19 (not yet released) ...@@ -15,7 +15,10 @@ ver 0.19 (not yet released)
ver 0.18.7 (not yet released) ver 0.18.7 (not yet released)
* playlist * playlist
- pls: fix crash after parser error
- soundcloud: fix build failure with libyajl 2.0.1 - soundcloud: fix build failure with libyajl 2.0.1
* decoder
- faad: fix memory leak
* daemon: don't initialize supplementary groups when already running * daemon: don't initialize supplementary groups when already running
as the configured user as the configured user
......
...@@ -986,7 +986,7 @@ systemctl start mpd.socket</programlisting> ...@@ -986,7 +986,7 @@ systemctl start mpd.socket</programlisting>
<tbody> <tbody>
<row> <row>
<entry> <entry>
<varname>default_bute_order</varname> <varname>default_byte_order</varname>
<parameter>little_endian|big_endian</parameter> <parameter>little_endian|big_endian</parameter>
</entry> </entry>
<entry> <entry>
......
...@@ -359,6 +359,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is) ...@@ -359,6 +359,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is)
if (!faad_decoder_init(decoder, buffer, audio_format, error)) { if (!faad_decoder_init(decoder, buffer, audio_format, error)) {
LogError(error); LogError(error);
NeAACDecClose(decoder); NeAACDecClose(decoder);
decoder_buffer_free(buffer);
return; return;
} }
...@@ -428,6 +429,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is) ...@@ -428,6 +429,7 @@ faad_stream_decode(Decoder &mpd_decoder, InputStream &is)
/* cleanup */ /* cleanup */
NeAACDecClose(decoder); NeAACDecClose(decoder);
decoder_buffer_free(buffer);
} }
static bool static bool
......
...@@ -67,7 +67,6 @@ pls_parser(GKeyFile *keyfile, std::forward_list<SongPointer> &songs) ...@@ -67,7 +67,6 @@ pls_parser(GKeyFile *keyfile, std::forward_list<SongPointer> &songs)
FormatError(pls_domain, "Invalid PLS entry %s: '%s'", FormatError(pls_domain, "Invalid PLS entry %s: '%s'",
key, error->message); key, error->message);
g_error_free(error); g_error_free(error);
g_free(key);
return; return;
} }
......
...@@ -42,7 +42,8 @@ const char * ...@@ -42,7 +42,8 @@ const char *
uri_get_suffix(const char *uri) uri_get_suffix(const char *uri)
{ {
const char *suffix = strrchr(uri, '.'); const char *suffix = strrchr(uri, '.');
if (suffix == nullptr) if (suffix == nullptr || suffix == uri ||
suffix[-1] == '/' || suffix[-1] == '\\')
return nullptr; return nullptr;
++suffix; ++suffix;
......
...@@ -29,6 +29,10 @@ public: ...@@ -29,6 +29,10 @@ public:
"jpg")); "jpg"));
CPPUNIT_ASSERT_EQUAL(0, strcmp(uri_get_suffix("/foo.png/bar.jpg"), CPPUNIT_ASSERT_EQUAL(0, strcmp(uri_get_suffix("/foo.png/bar.jpg"),
"jpg")); "jpg"));
CPPUNIT_ASSERT_EQUAL((const char *)nullptr,
uri_get_suffix(".jpg"));
CPPUNIT_ASSERT_EQUAL((const char *)nullptr,
uri_get_suffix("/foo/.jpg"));
} }
void TestRemoveAuth() { void TestRemoveAuth() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment