You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Considering that 'next_index', 'sequence_number', 'rightmost_leaf' are pub field, and sequence_numbernext_index........ are also pub function. I assume that users can directly manipulate this field. This potential situation could result in *self.sequence_number being dereference a null pointer, and directly dereferencing it might trigger undefined behavior (UB). For safety reasons, I felt it necessary to report this issue. If you have performed checks elsewhere that ensure this is safe, please don’t take offense at my raising this issue.
If there is no external usage for ConcurrentMerkleTree, I suggest it should not marked as pub, at least its field should not marked as pub.
The text was updated successfully, but these errors were encountered:
hello, thank you for your contribution in this project, I am scanning the unsoundness problem in rust project.
I notice the following code:
Considering that
'next_index', 'sequence_number', 'rightmost_leaf'
arepub
field, andsequence_number
next_index
........ are also pub function. I assume that users can directly manipulate this field. This potential situation could result in*self.sequence_number
being dereference a null pointer, and directly dereferencing it might trigger undefined behavior (UB). For safety reasons, I felt it necessary to report this issue. If you have performed checks elsewhere that ensure this is safe, please don’t take offense at my raising this issue.If there is no external usage for
ConcurrentMerkleTree
, I suggest it should not marked aspub
, at least its field should not marked aspub
.The text was updated successfully, but these errors were encountered: