From a90669cf3143e19bef5c6e0bf331c12f6d43a0dc Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Fri, 27 Oct 2023 04:08:33 -0300 Subject: [PATCH] proof: check poas slice usage exhaustion (#410) Signed-off-by: Ignacio Hagopian --- proof_ipa.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proof_ipa.go b/proof_ipa.go index 92b8307e..61ad51e4 100644 --- a/proof_ipa.go +++ b/proof_ipa.go @@ -449,6 +449,10 @@ func PreStateTreeFromProof(proof *Proof, rootC *Point) (VerkleNode, error) { // } } + if len(poas) != 0 { + return nil, fmt.Errorf("not all proof of absence stems were used: %d", len(poas)) + } + root := NewStatelessInternal(0, rootC).(*InternalNode) comms := proof.Cs for _, p := range paths {