diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-05 16:14:01 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-05 16:14:01 +0100 |
commit | d78d1e48b49eaa1a29a7496a3f72a8a0bb80b9b1 (patch) | |
tree | 4a86cb4ef664302b70759aa8211c32d4e97e19ec | |
parent | 690c1d27a73aec03453d1f88d1a1c19a29f9655c (diff) | |
download | rspamd-d78d1e48b49eaa1a29a7496a3f72a8a0bb80b9b1.tar.gz rspamd-d78d1e48b49eaa1a29a7496a3f72a8a0bb80b9b1.zip |
[Minor] Check boundary earlier
-rw-r--r-- | src/libserver/css/css_tokeniser.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/css/css_tokeniser.cxx b/src/libserver/css/css_tokeniser.cxx index bc77fc7e3..3035a6649 100644 --- a/src/libserver/css/css_tokeniser.cxx +++ b/src/libserver/css/css_tokeniser.cxx @@ -533,9 +533,9 @@ auto css_tokeniser::next_token(void) -> struct css_parser_token case '\r': case '\v': { /* Consume as much space as we can */ - do { + while (i < input.size() && g_ascii_isspace(c)) { c = input[++i]; - } while (i < input.size() && g_ascii_isspace(c)); + } auto ret = make_token<css_parser_token::token_type::whitespace_token>( std::string_view(&input[offset], i - offset)); |