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

Prevent zero length messages #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mjgarton
Copy link
Contributor

@mjgarton mjgarton commented May 9, 2020

Due to the design of the on-disk format of freezer, it does not support
zero length messages. If we allow a zero length message to be written
by the sink, it is indistinguishable om disk from the internally used
end marker, and when being read as a source, is detected as a corrupt
stream.

Avoid this problem by explicitly dis-allowing empty messages and
returning an error if the caller attempts to write one.

Due to the design of the on-disk format of freezer, it does not support
zero length messages.  If we allow a zero length message to be written
by the sink, it is indistinguishable om disk from the internally used
end marker, and when being read as a source, is detected as a corrupt
stream.

Avoid this problem by explicitly dis-allowing empty messages and
returning an error if the caller attempts to write one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant