From 099ae44013e09d869ec24046ecadbf55038bb878 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 6 May 2021 15:15:01 +0100 Subject: [Minor] Css: Fix parsing of the url tokens --- src/libserver/css/css_tokeniser.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libserver/css') diff --git a/src/libserver/css/css_tokeniser.cxx b/src/libserver/css/css_tokeniser.cxx index f4180b761..d6ddc2a5f 100644 --- a/src/libserver/css/css_tokeniser.cxx +++ b/src/libserver/css/css_tokeniser.cxx @@ -249,7 +249,7 @@ auto css_tokeniser::consume_ident(bool allow_number) -> struct css_parser_token j++; } - if (input.size() > 3 && input.substr(0, 3) == "url") { + if (input.size() - offset > 3 && input.substr(offset, 3) == "url") { if (input[j] == '"' || input[j] == '\'') { /* Function token */ auto ret = maybe_escape_sv(i, -- cgit v1.2.3