Skip to content

tls_wrap: slice buffer properly in ClearOut - #4184

Closed
indutny wants to merge 2 commits into
nodejs:masterfrom
indutny:fix/gh-4161
Closed

tls_wrap: slice buffer properly in ClearOut#4184
indutny wants to merge 2 commits into
nodejs:masterfrom
indutny:fix/gh-4161

Conversation

@indutny

Copy link
Copy Markdown
Member

Fix incorrect slicing of cleartext buffer in TLSWrap::ClearOut.

Fix: #4161

Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.
Fix: nodejs#4161
@indutny

Copy link
Copy Markdown
MemberAuthor

@indutny

Copy link
Copy Markdown
MemberAuthor

cc @nodejs/crypto

@indutnyindutny added tls Issues and PRs related to the tls subsystem. c++ Issues and PRs that require attention from people who are familiar with C++. labels Dec 8, 2015
@indutny

Copy link
Copy Markdown
MemberAuthor

CI is green

Comment threadtest/parallel/test-tls-inception.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to assume the entire body will always come in one data event?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, of course no.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

@mscdex

Copy link
Copy Markdown
Contributor

LGTM

@indutny

Copy link
Copy Markdown
MemberAuthor

Landed in c0cb80e, thank you!

@indutnyindutny closed this Dec 8, 2015
indutny added a commit that referenced this pull request Dec 8, 2015
Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.
Fix: #4161
PR-URL: #4184
Reviewed-By: Brian White <mscdex@mscdex.net>
@indutny
indutny deleted the fix/gh-4161 branch December 8, 2015 05:19

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be on?
Also, is gotHello really necessary?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arghh... It should be on indeed. @santigimeno would it be interesting to you to submit a PR with a fix for this?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotHello seems to be necessary, but could be replaced with common.mustCall in ssl.on('end', ...)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said about gotHello because would the test exit if no end event was received?
Yes, I can send a PR.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @santigimeno . Please don't forget to cc me on that PR ;)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@indutny PR: #4195. Thanks

indutny added a commit that referenced this pull request Dec 9, 2015
Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.
Fix: #4161
PR-URL: #4184
Reviewed-By: Brian White <mscdex@mscdex.net>
@rvaggrvagg mentioned this pull request Dec 17, 2015
indutny added a commit that referenced this pull request Dec 30, 2015
Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.
Fix: #4161
PR-URL: #4184
Reviewed-By: Brian White <mscdex@mscdex.net>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.
Fix: #4161
PR-URL: #4184
Reviewed-By: Brian White <mscdex@mscdex.net>
@MylesBorinsMylesBorins mentioned this pull request Jan 19, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Fix incorrect slicing of cleartext buffer in `TLSWrap::ClearOut`.
Fix: nodejs#4161
PR-URL: nodejs#4184
Reviewed-By: Brian White <mscdex@mscdex.net>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.tlsIssues and PRs related to the tls subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@indutny@mscdex@santigimeno@MylesBorins