lightningcss
lightningcss copied to clipboard
[BUG] `DeclarationBlock::parse_string()` takes way too much time
Hi!
During my fuzzing journey, I came across the following issue. If I try to create a DeclarationBlock from the following string, it takes about 8 to 9 seconds, which is a lot 😅 I thought, you would like to take a look! Thanks!
use lightningcss::declaration::DeclarationBlock;
use lightningcss::stylesheet::ParserOptions;
fn main() {
let s = "background:acos((((((((((((((((((((((((((((((((((((((((((((atan2(asin((((((((((((((atan2(((((((((((((sin((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((atan2(asin((((((((((((((atan2(((((((((((((sin((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((1111111111111111/111111111111110deg,oklch(333333333333333333333333333333333333s=";
let _x = DeclarationBlock::parse_string(s, ParserOptions::default());
}
lol why would anyone input a string like that in reality?
lol why would anyone input a string like that in reality?
It's a fuzzing sample)