mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-10 04:51:20 +00:00
stricter protection against bad dict in decompressor (#962)
This commit is contained in:
parent
9431fe1b94
commit
6cb595fe66
@ -187,7 +187,7 @@ func NewDecompressor(compressedFilePath string) (*Decompressor, error) {
|
||||
|
||||
for i < dictSize {
|
||||
d, ns := binary.Uvarint(data[i:])
|
||||
if d > 2048 {
|
||||
if d > 64 { // mainnet has maxDepth 31
|
||||
return nil, fmt.Errorf("dictionary is invalid: patternMaxDepth=%d", d)
|
||||
}
|
||||
depths = append(depths, d)
|
||||
|
Loading…
Reference in New Issue
Block a user