sketches-go
sketches-go copied to clipboard
[bug] panic, runtime: out of memory when decoding crafted payload
The following payload will cause the program to try to allocate a huge (833254811566 floats64) slice. Which correspond to 6.6+ terabytes. The payload was found with the fuzzer proposed in this PR.
func TestRegression(t *testing.T) {
_, _ = DecodeDDSketch([]byte("\x0f\x0f\u06dd\u06dd\xd0000"), store.DenseStoreConstructor, nil)
}
Note: At first glance, it looks like the getNewLength() should use a uint as well?