mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Merge pull request #1660 from lightpanda-io/fix_css_parse_overflow
Fix possible overflow when parsing floats without an integer
This commit is contained in:
@@ -583,7 +583,7 @@ fn consumeNumeric(self: *Tokenizer) Token {
|
|||||||
};
|
};
|
||||||
|
|
||||||
self.advance(2);
|
self.advance(2);
|
||||||
} else if (self.hasAtLeast(1) and std.ascii.isDigit(self.byteAt(2))) {
|
} else if (self.hasAtLeast(2) and std.ascii.isDigit(self.byteAt(2))) {
|
||||||
self.advance(1);
|
self.advance(1);
|
||||||
} else {
|
} else {
|
||||||
break :blk;
|
break :blk;
|
||||||
|
|||||||
@@ -154,3 +154,11 @@
|
|||||||
testing.expectEqual(true, typeof div.style.getPropertyPriority === 'function');
|
testing.expectEqual(true, typeof div.style.getPropertyPriority === 'function');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<div id=crash1 style="background-position: 5% .1em"></div>
|
||||||
|
<script id="crash_case_1">
|
||||||
|
{
|
||||||
|
testing.expectEqual('5% .1em', $('#crash1').style.backgroundPosition);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user