summaryrefslogtreecommitdiff
path: root/gst/gsturi.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2012-05-01 19:47:05 +0100
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2012-05-01 19:50:36 +0100
commitd35487e50c185a7198944ef89adcd0a7348d474f (patch)
tree5d66953a83cc9153da98eb2b1726cb33786359d2 /gst/gsturi.c
parent105fa1ffde71f6a553f514ae47f3a453035ba254 (diff)
uri: require URI protocol bit to be at least 3 characters to be valid
We want to return FALSE when run on a windows-style file path. https://bugzilla.gnome.org/show_bug.cgi?id=674296
Diffstat (limited to 'gst/gsturi.c')
-rw-r--r--gst/gsturi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/gsturi.c b/gst/gsturi.c
index 75c3440ea..afe290794 100644
--- a/gst/gsturi.c
+++ b/gst/gsturi.c
@@ -313,7 +313,7 @@ gst_uri_protocol_is_valid (const gchar * protocol)
gst_uri_protocol_check_internal (protocol, &endptr);
- return *endptr == '\0' && endptr != protocol;
+ return *endptr == '\0' && ((gsize) (endptr - protocol)) >= 3;
}
/**
@@ -334,7 +334,7 @@ gst_uri_is_valid (const gchar * uri)
gst_uri_protocol_check_internal (uri, &endptr);
- return *endptr == ':';
+ return *endptr == ':' && ((gsize) (endptr - uri)) >= 3;
}
/**