public sealed class LayerRuleTargetAn @layer rule, read out of the text ExCSS could not parse.
Remarks
A hand-written brace matcher over text a library already gave up on, which is the combination worth fuzzing. ExCSS 4.3.2 does not know cascade layers and hands the rule back whole, so this reader is the only thing standing between an author's braces and the rest of the cascade — and it has to be right about brace balance inside strings and comments, each of which is a scanner that can run off the end.
⚠ Two invariants come free from the shape of the method, and neither is asserted anywhere else. It returns a bool and has no failure channel, so it must never throw for any string at all; and a Try… that returns false must leave its out-parameter at the default, because a caller that ignores the result and reads the out-param is the bug this pattern exists to prevent. Both are checked here rather than assumed, which is what makes this a target and not a smoke test.
Fields and properties (2)
public string NameWhat to call it on a command line and in a report.
public string WhatWhich receive path this is, in one line.
Methods (3)
public long AllowanceFor(int inputLength)How many bytes an input may cause to be allocated.
public void Seed(ICollection<byte[]> corpus)Adds well-formed inputs for the mutator to start from.
public long Run(ReadOnlySpan<byte> input)Pushes one input through the decoder.
Used by (1)
- FuzzTargetsVixen.Fuzz