Repository navigation
Commit de85fa5
committed
fix(spec): don't panic on invalid UTF-8 in requirement names
applyRename built a regexp with regexp.MustCompile from an unescaped
requirement name; a name containing invalid UTF-8 (or a bad pattern) panicked
the whole process. Use regexp.Compile and fall back to leaving the content
unchanged, and ReplaceAllLiteralString so $$ in the new name is not treated as
a group reference. Found by the new FuzzParseDeltaSpec target.1 parent 6209822 commit de85fa5
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
77 | 83 | | |
78 | 84 | | |
79 | 85 | | |
| |||
0 commit comments