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

Bug: MboxoReader can return more data than requested if 0 < size < 7 #416

Open
sebbASF opened this issue Oct 3, 2017 · 1 comment
Open
Labels

Comments

@sebbASF
Copy link
Contributor

sebbASF commented Oct 3, 2017

To simplify the MboxoReader code, it currently forces a read of less than 7 bytes to read 7 bytes.
The response can potentially return more bytes than requested.

The existing Python mailbox code which calls it either reads everything or uses a size of 8192, so this should not be a problem in practise, but it should be at least noted that the code is not completely generic.

asfgit pushed a commit that referenced this issue Oct 3, 2017
@sebbASF
Copy link
Contributor Author

sebbASF commented Oct 3, 2017

Note: the simplification only really works for mboxo format mailboxes.
A different approach would be needed to support mboxrd format as this can have an arbitrary number of '>' chars before the From.

@sebbASF sebbASF added bug and removed enhancement labels Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant