Potential overflow
A0nameless0man opened this issue · 1 comments
A0nameless0man commented
This line reserves 4 ArrayVec with capacity of 24 to record kawa.
Which isn't adequate because this lines can push at most 8 None
into it .
Mortal/libriichi/src/state/update.rs
Lines 692 to 699 in c357889
In my test , program sometimes crash at this line.
Mortal/libriichi/src/state/update.rs
Line 233 in c357889
Equim-chan commented
This has been fixed in v2 but not yet ported to v1 (this repo). The fix simply goes by changing ArrayVec
to TinyVec
.