aboutsummaryrefslogtreecommitdiffstats
path: root/src/uri.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-04-11 18:49:32 +0000
committerDavid Robillard <d@drobilla.net>2014-04-11 18:49:32 +0000
commit85a7ec2b8e11085b74c3a5966753a0b43a264c8a (patch)
tree07af4e12f66bb695e6969602d06b1b69918a72c3 /src/uri.c
parent60df320d954e5a82c7c4abc213bc4d396a3ef271 (diff)
downloadserd-85a7ec2b8e11085b74c3a5966753a0b43a264c8a.tar.gz
serd-85a7ec2b8e11085b74c3a5966753a0b43a264c8a.tar.bz2
serd-85a7ec2b8e11085b74c3a5966753a0b43a264c8a.zip
Minor hardening.
git-svn-id: http://svn.drobilla.net/serd/trunk@459 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/uri.c')
-rw-r--r--src/uri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/uri.c b/src/uri.c
index 8f3bb997..6f7380b0 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -100,7 +100,7 @@ bool
serd_uri_string_has_scheme(const uint8_t* utf8)
{
// RFC3986: scheme ::= ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
- if (!is_alpha(utf8[0])) {
+ if (!utf8 || !is_alpha(utf8[0])) {
return false; // Invalid scheme initial character, URI is relative
}
for (uint8_t c; (c = *++utf8) != '\0';) {