Our inputbuf is way too small. We can get into a situation, where we don't have enough space to hold a whole CMF chunk, and therefore can't decode anymore. We end up wrapping around our unsigned remaining length and crashing.
The fix here is two fold:
Increase the inputbuf to 32768. This is bigger than any CFM chunk
Fix the wrap around so we don't crash, just in case!
Our inputbuf is way too small. We can get into a situation, where we don't have enough space to hold a whole CMF chunk, and therefore can't decode anymore. We end up wrapping around our unsigned remaining length and crashing.
The fix here is two fold: