Closed elias-orijtech closed 1 year ago
The value n is only checked for negative values but not for values greater than len(n).
n
len(n)
https://github.com/cosmos/iavl/blob/747bc123a38b5803b470fb0faa649207a6c2d739/compress.go#L106-L111
if, on the other hand,deltaEncode should never fail because input is trusted then it shouldn't return an error.
deltaEncode
CC @odeke-em
Nevermind, misunderstood the code.
The value
n
is only checked for negative values but not for values greater thanlen(n)
.https://github.com/cosmos/iavl/blob/747bc123a38b5803b470fb0faa649207a6c2d739/compress.go#L106-L111
if, on the other hand,
deltaEncode
should never fail because input is trusted then it shouldn't return an error.CC @odeke-em