mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 08:31:51 +00:00
LibWeb: Disallow empty font-language-override
string values
This commit is contained in:
parent
a4d931d14a
commit
c55f281475
Notes:
github-actions[bot]
2025-06-14 20:06:16 +00:00
Author: https://github.com/tcl3
Commit: c55f281475
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5091
Reviewed-by: https://github.com/shannonbooth
2 changed files with 7 additions and 3 deletions
|
@ -2623,6 +2623,10 @@ RefPtr<CSSStyleValue const> Parser::parse_font_language_override_value(TokenStre
|
|||
return nullptr;
|
||||
}
|
||||
auto length = string_value.code_points().length();
|
||||
if (length == 0) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: Failed to parse font-language-override: <string> value is empty");
|
||||
return nullptr;
|
||||
}
|
||||
if (length > 4) {
|
||||
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: Failed to parse font-language-override: <string> value \"{}\" is too long", string_value);
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue