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

messageWriter.writeString shouldn't ignore IO errors #30

Closed
alser777 opened this issue Jul 31, 2018 · 5 comments
Closed

messageWriter.writeString shouldn't ignore IO errors #30

alser777 opened this issue Jul 31, 2018 · 5 comments

Comments

@alser777
Copy link

func (w *messageWriter) writeString(s string) {
	n, _ := io.WriteString(w.w, s)
	w.n += int64(n)
}

Error return by io.WriteString is silently ignored.

@cryptix
Copy link

cryptix commented Jul 31, 2018

Where do you found this?

I think you mean this code from the forked gomail ? This isn't part of this codebase, if at all it was turned into newCopier() in message.go which looks fine.

@alser777
Copy link
Author

alser777 commented Jul 31, 2018

writeto.go

@cryptix
Copy link

cryptix commented Jul 31, 2018

Looks like I was holding that totally wrong.

Sorry, you are right and I agree that it should set w.err and not ignore it.

@cryptix
Copy link

cryptix commented Jul 31, 2018

@LethalRes check the PR I just made

@ivy ivy closed this as completed in a0242b2 Jul 31, 2018
@ivy
Copy link

ivy commented Jul 31, 2018

@LethalRes This should be fixed now. Thanks again @cryptix! 👍

diamondburned pushed a commit to diamondburned/gomail that referenced this issue Aug 21, 2022
…tion

Migrate off probot-CLA to new GitHub Action
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 a pull request may close this issue.

3 participants