Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Off-by-one error in shoco.c function: shoco_compress #15

Open
aberacioppo opened this issue Nov 17, 2015 · 1 comment
Open

Off-by-one error in shoco.c function: shoco_compress #15

aberacioppo opened this issue Nov 17, 2015 · 1 comment

Comments

@aberacioppo
Copy link

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants