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

p9: drain extra bytes from message that's larger than msize #27

Open
DeedleFake opened this issue May 17, 2018 · 0 comments
Open

p9: drain extra bytes from message that's larger than msize #27

DeedleFake opened this issue May 17, 2018 · 0 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@DeedleFake
Copy link
Owner

Currently, if ReadMessage() tries to read a message that's longer than msize, it stops and returns an error. If the connected client is actually a valid client, however, but somehow messed up its msize, this means that the server is left in a position that it can't recover from very cleanly.

A possible fix for this would be for the server to drain the remaining bytes from the long message, allowing the next call to ReadMessage() to read a hopefully valid message. The question, however, is should ReadMessage() handle this automatically in this way. I'm leaning heavily towards it doing so, but I'm a bit worried that it could cause other problems.

@DeedleFake DeedleFake added bug Something isn't working question Further information is requested labels May 17, 2018
@DeedleFake DeedleFake self-assigned this May 17, 2018
@DeedleFake DeedleFake added this to To do in Initial Implemenation via automation May 17, 2018
@DeedleFake DeedleFake changed the title Drain Unread Bytes from Long Messages p9: drain extra bytes from message that's larger than msize Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
Development

No branches or pull requests

1 participant