Mike Percy has submitted this change and it was merged. Change subject: KUDU-2004. Undefined behavior in TlsSocket::Writev() ......................................................................
KUDU-2004. Undefined behavior in TlsSocket::Writev() TlsSocket::Writev() was attempting to use the value of nwritten from TlsSocket::Write(), but in the case of an error that value was never set or initialized. A simple check to make sure the result from TlsSocket::Write() wasn't an error was added, otherwise we break out of the write loop to cleanup and return the error (thus skipping the line that uses nwritten) Dist job result from before the fix: http://dist-test.cloudera.org/job?job_id=efan.1496860112.16151 Dist job result from after the fix: http://dist-test.cloudera.org/job?job_id=efan.1497036430.19311 Change-Id: Ia5b5bbb3fd2ec8fcd1a48873446f3aa09546eaac Reviewed-on: http://gerrit.cloudera.org:8080/7141 Tested-by: Kudu Jenkins Reviewed-by: Mike Percy <[email protected]> --- M src/kudu/security/tls_socket.cc M src/kudu/util/net/socket.h 2 files changed, 10 insertions(+), 0 deletions(-) Approvals: Mike Percy: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/7141 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia5b5bbb3fd2ec8fcd1a48873446f3aa09546eaac Gerrit-PatchSet: 12 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Edward Fancher <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Edward Fancher <[email protected]> Gerrit-Reviewer: Jean-Daniel Cryans <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <[email protected]>
