celestiaorg / nmt

Namespaced Merkle Tree
Apache License 2.0
113 stars 39 forks source link

Wrapper Push function will panic if the data is invalid #144

Closed andrijamitrovic23 closed 1 year ago

andrijamitrovic23 commented 1 year ago

Push function form ErasuredNamespacedMerkleTree will panic if it is called with data which size is smaller than the NamespaceSize. The panic will happen on this line. This is because the slice data[:appconsts.NamespaceSize] is out of bounds of the byte array.