Off-by-one error in shoco.c function: shoco_compress
aberacioppo opened this issue · 1 comments
aberacioppo commented
Unable to determine where this error occurs but the tests.c asserts fail when checking how many bytes are written to the output buffer.
For example, shoco_compress(MESSAGE,1,Out_buf,4) where MESSAGE is 3 characters long will return 2. If we change the 1 to n then the function will return n+1
ararslan commented
When shoco_compress
writes 2 bytes to Out
with the input 1, is the second byte in Out
a null byte? If so, I think that might be expected.