mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-30 16:28:48 +00:00
LibWeb: Restrict HTMLTextAreaElement::min_length
to the range of i32
This commit is contained in:
parent
ac7fad52f6
commit
7097152ebc
Notes:
github-actions[bot]
2024-12-02 09:26:49 +00:00
Author: https://github.com/tcl3
Commit: 7097152ebc
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2685
3 changed files with 21 additions and 2 deletions
|
@ -276,7 +276,7 @@ WebIDL::Long HTMLTextAreaElement::min_length() const
|
|||
{
|
||||
// The minLength IDL attribute must reflect the minlength content attribute, limited to only non-negative numbers.
|
||||
if (auto minlength_string = get_attribute(HTML::AttributeNames::minlength); minlength_string.has_value()) {
|
||||
if (auto minlength = parse_non_negative_integer(*minlength_string); minlength.has_value())
|
||||
if (auto minlength = parse_non_negative_integer(*minlength_string); minlength.has_value() && *minlength <= 2147483647)
|
||||
return *minlength;
|
||||
}
|
||||
return -1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue