FiniteStateEntropy icon indicating copy to clipboard operation
FiniteStateEntropy copied to clipboard

Negative index into stateTable?

Open chhu opened this issue 2 years ago • 2 comments

This is more a question: How can you guarantee that this index to stateTable cannot become negative?

https://github.com/Cyan4973/FiniteStateEntropy/blob/7149fa45ec69f54a709e5260e6a0eeb27e710ee0/lib/fse.h#L520

Thanks!

chhu avatar Jun 13 '23 14:06 chhu

I've gotten segfaults here as well, usually when using more than 128 symbols.

I changed the code to check for out of range index and throw an exception.

madMAx43v3r avatar Nov 20 '23 10:11 madMAx43v3r