TestPrepareExpressionMalformedInput reproduces OSS-Fuzz issue 471488972.
(t *testing.T)
| 127 | |
| 128 | // TestPrepareExpressionMalformedInput reproduces OSS-Fuzz issue 471488972. |
| 129 | func TestPrepareExpressionMalformedInput(t *testing.T) { |
| 130 | inputs := []string{ |
| 131 | "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", |
| 132 | "[[[[[[[[[[[", |
| 133 | string([]byte{0xff, 0xfe, 0xfd}), |
| 134 | "", |
| 135 | } |
| 136 | for _, input := range inputs { |
| 137 | require.NotPanics(t, func() { |
| 138 | _, _ = prepareExpression(input) |
| 139 | }) |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | func FuzzPrepareExpression(f *testing.F) { |
| 144 | f.Add("mean(clockaccuracy, 5) + abs(mean(offset, 5)) + 1.0 * stddev(offset, 4) + 1.0 * stddev(delay, 4) + 1.0 * stddev(freq, 5)") |
nothing calls this directly
no test coverage detected
searching dependent graphs…