diff options
author | Max Kellermann <max@duempel.org> | 2008-10-27 10:10:24 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-27 10:10:24 +0100 |
commit | 0d30d51f07f1c55caf974c671fa702307c163878 (patch) | |
tree | 3d3c5cbb0a0ac122ce8308966cd093029a4b61cc /src/input_curl.c | |
parent | 355108666c89bf2a637610b0f7a81974d1f312e4 (diff) | |
download | mpd-0d30d51f07f1c55caf974c671fa702307c163878.tar.gz mpd-0d30d51f07f1c55caf974c671fa702307c163878.tar.xz mpd-0d30d51f07f1c55caf974c671fa702307c163878.zip |
input_file, input_curl: check URL type before attempting to open
Don't attempt to open a HTTP URL as a local file, and don't send a
local path to libcurl.
Diffstat (limited to 'src/input_curl.c')
-rw-r--r-- | src/input_curl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/input_curl.c b/src/input_curl.c index ad471795e..9ac529a63 100644 --- a/src/input_curl.c +++ b/src/input_curl.c @@ -473,6 +473,9 @@ input_curl_open(struct input_stream *is, const char *url) struct input_curl *c; bool ret; + if (strncmp(url, "http://", 7) != 0) + return false; + c = g_new0(struct input_curl, 1); c->url = g_strdup(url); INIT_LIST_HEAD(&c->buffers); |