aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/input_curl.c3
-rw-r--r--src/input_file.c3
2 files changed, 6 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);
diff --git a/src/input_file.c b/src/input_file.c
index eece19c53..8ffe11395 100644
--- a/src/input_file.c
+++ b/src/input_file.c
@@ -26,6 +26,9 @@ input_file_open(struct input_stream *is, const char *filename)
{
FILE *fp;
+ if (filename[0] != '/')
+ return false;
+
fp = fopen(filename, "r");
if (!fp) {
is->error = errno;