mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWeb: Don't crash when parsing large floating point number values
Previously, attempting to parse a floating point number with an integer part larger than `(2 ^ 31) - 1` would cause the browser to crash. We now avoid this by converting the integer part of the number to a `double` rather than an `i32`.
This commit is contained in:
committed by
Andreas Kling
parent
cf7a1f6a52
commit
21a32e4b6d
Notes:
github-actions[bot]
2024-10-31 07:06:15 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/21a32e4b6dc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2066
@@ -0,0 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<progress max="1000000000000000000000"></progress>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
const progressElement = document.querySelector("progress");
|
||||
println(`progressElement.max: ${progressElement.max}`);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user