commit d78d1e4: [Minor] Check boundary earlier
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed May 5 15:21:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-05-05 16:14:01 +0100
URL: https://github.com/rspamd/rspamd/commit/d78d1e48b49eaa1a29a7496a3f72a8a0bb80b9b1
[Minor] Check boundary earlier
---
src/libserver/css/css_tokeniser.cxx | 4 ++--
1 file 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));
More information about the Commits
mailing list