Closed frenkel26 closed 1 year ago
For some zk proofs, when the proof is absent from the message, the verifier panics with nil dereference.
Some proofs implement the Verify function as a pointer receiver, like this:
func (p *Proof) Verify(hash *hash.Hash, ...) bool { if !p.IsValid() { return false }
if p == nil, then p.IsValid will catch it.
p == nil
Other proofs implement the Verify function as a value receiver, like this:
func (p Proof) Verify(hash *hash.Hash, ...) bool { if !p.IsValid() { return false }
if p == nil, the casting will result with nil dereference.
Description
For some zk proofs, when the proof is absent from the message, the verifier panics with nil dereference.
Details
Some proofs implement the Verify function as a pointer receiver, like this:
if
p == nil
, then p.IsValid will catch it.Other proofs implement the Verify function as a value receiver, like this:
if
p == nil
, the casting will result with nil dereference.