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 buffer corruption in ReadUntil #17

Merged
merged 1 commit into from
Mar 22, 2016

Conversation

heyitsanthony
Copy link
Contributor

This fixes two bugs:

  1. join initialization prepends a nul character to the return string
  2. the call to PutBack puts extra bytes back into the buffer

@ppalucki
Copy link
Contributor

ppalucki commented Mar 4, 2016

you may be interested in back-porting this one coreos#4 from coreos/gexpect fork

if fixes our problem we get from ReadUnitil if there are multbyte unicode characters

It looks like simiar issue - forgive me, I didn't made better analysis is it the same cause or not

@heyitsanthony
Copy link
Contributor Author

Won't fix this issue; the slice handling here is broken even for single-byte runes.

@ThomasRooney ThomasRooney merged commit 9280703 into ThomasRooney:master Mar 22, 2016
@ThomasRooney
Copy link
Owner

Thanks! Sorry for the delay in merging

@heyitsanthony heyitsanthony deleted the fix-readuntil branch March 23, 2016 17:38
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

Successfully merging this pull request may close these issues.

3 participants