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

Fix BSON serializer #6

Open
c-w opened this issue Oct 4, 2020 · 0 comments
Open

Fix BSON serializer #6

c-w opened this issue Oct 4, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@c-w
Copy link
Member

c-w commented Oct 4, 2020

The BSON serializer currently crashes for many inputs. I believe this is because the serialized format for a specific email may contain the \n character, e.g. in attachments... but we also use this character as a record separator to be able to read/write multiple serialized emails to a single file. This means that when we try to deserialize an email, reading to the first \n character may give us back a corrupt BSON record if the original email contained a raw \n character.

A suggested fix is either to find a way to stream multiple records in a single file pointer (similar to the CBOR implementation), or find another record delimiter which is guaranteed not to clash with any data in the file. But of course, other approaches that fix the problem are welcome too!

@c-w c-w added bug Something isn't working help wanted Extra attention is needed labels Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant