Repository navigation
Commit 9a87909
fix(dart): blank string literals with a linear scan, not a regex (CodeQL, #790)
CodeQL's polynomial-ReDoS check still flagged the disjoint form
"(?:[^"\\]|\\.)*" — an unterminated literal of escaped quotes is
rescanned from every inner quote. The `main(` line scan now blanks
literals and cuts the `//` comment with a hand-written character loop,
linear by construction; same tests, same results.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent bfd3531 commit 9a87909
1 file changed
Lines changed: 29 additions & 7 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
48 | 70 | | |
49 | 71 | | |
50 | 72 | | |
| |||
0 commit comments