summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-01-03 13:16:29 +0100
committerMax Kellermann <max@musicpd.org>2017-01-03 13:17:02 +0100
commit31d77ec58032cc67c81118f6f6fd136c90947dff (patch)
tree896297c198a7179b6e4b2d8915cc5b8b727ee209 /src/input
parent06116382eefbddebc55404183e67ad7f68551ed6 (diff)
input/curl, ...: use strncmp() instead of memcmp() to avoid crash
Diffstat (limited to 'src/input')
-rw-r--r--src/input/plugins/CurlInputPlugin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input/plugins/CurlInputPlugin.cxx b/src/input/plugins/CurlInputPlugin.cxx
index 5c202973f..bd2fff86a 100644
--- a/src/input/plugins/CurlInputPlugin.cxx
+++ b/src/input/plugins/CurlInputPlugin.cxx
@@ -433,8 +433,8 @@ CurlInputStream::Open(const char *url, Mutex &mutex, Cond &cond)
static InputStream *
input_curl_open(const char *url, Mutex &mutex, Cond &cond)
{
- if (memcmp(url, "http://", 7) != 0 &&
- memcmp(url, "https://", 8) != 0)
+ if (strncmp(url, "http://", 7) != 0 &&
+ strncmp(url, "https://", 8) != 0)
return nullptr;
return CurlInputStream::Open(url, mutex, cond);