From 43566b655fee76947e0166d74a9dda4c03be26e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 11 May 2026 13:37:53 +0200 Subject: [PATCH] uri: check 'scheme' is non-null before de-referencing it --- uri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uri.c b/uri.c index e09f7a97..febe2e47 100644 --- a/uri.c +++ b/uri.c @@ -144,7 +144,7 @@ uri_parse(const char *uri, size_t len, const char *query_start = memchr(start, '?', left); const char *fragment_start = memchr(start, '#', left); - if (streq(*scheme, "file")) { + if (scheme != NULL && streq(*scheme, "file")) { /* Don't try to parse query/fragment in file URIs, just treat the remaining text as path */ query_start = NULL;