[kudu-CR] Make ParseAddressList not OK empty address lists

2016-06-24 Thread Todd Lipcon (Code Review)
Todd Lipcon has submitted this change and it was merged.

Change subject: Make ParseAddressList not OK empty address lists
..


Make ParseAddressList not OK empty address lists

ParseAddressList would return Status::OK, even when called to parse
an empty list of addresses. In some cases (KUDU-1490), this could
lead to a segfault if the caller doesn't check to see if the returned
vector is empty and tries to access the returned elements.

Current usages of ParseAddressList don't seem to have a standard behavior
that makes sense when called with an empty address string. Instead,
ParseAddressList should do the check and return Status::InvalidArgument.

Change-Id: Idedc2ad9f2ab321a5bb7aa65ea59b8f1a4186377
Reviewed-on: http://gerrit.cloudera.org:8080/3486
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon 
---
M src/kudu/tools/kudu-ksck.cc
M src/kudu/util/net/net_util.cc
2 files changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Todd Lipcon: Looks good to me, approved
  Kudu Jenkins: Verified



-- 
To view, visit http://gerrit.cloudera.org:8080/3486
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idedc2ad9f2ab321a5bb7aa65ea59b8f1a4186377
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] Make ParseAddressList not OK empty address lists

2016-06-24 Thread Todd Lipcon (Code Review)
Todd Lipcon has posted comments on this change.

Change subject: Make ParseAddressList not OK empty address lists
..


Patch Set 3: Code-Review+2

-- 
To view, visit http://gerrit.cloudera.org:8080/3486
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idedc2ad9f2ab321a5bb7aa65ea59b8f1a4186377
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Make ParseAddressList not OK empty address lists

2016-06-24 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Make ParseAddressList not OK empty address lists
..


Patch Set 1:

Build Started http://104.196.14.100/job/kudu-gerrit/1979/

-- 
To view, visit http://gerrit.cloudera.org:8080/3486
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Idedc2ad9f2ab321a5bb7aa65ea59b8f1a4186377
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Andrew Wong 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: No


[kudu-CR] Make ParseAddressList not OK empty address lists

2016-06-24 Thread Andrew Wong (Code Review)
Andrew Wong has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/3486

Change subject: Make ParseAddressList not OK empty address lists
..

Make ParseAddressList not OK empty address lists

ParseAddressList would return Status::OK, even when called to parse
an empty list of addresses. In some cases (KUDU-1490), this could
lead to a segfault if the caller doesn't check to see if the returned
vector is empty and tries to access the returned elements.

Current usages of ParseAddressList don't seem to have a standard behavior
that makes sense when called with an empty address string. Instead,
ParseAddressList should do the check and return Status::InvalidArgument.

Change-Id: Idedc2ad9f2ab321a5bb7aa65ea59b8f1a4186377
---
M src/kudu/tools/kudu-ksck.cc
M src/kudu/util/net/net_util.cc
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/86/3486/1
-- 
To view, visit http://gerrit.cloudera.org:8080/3486
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idedc2ad9f2ab321a5bb7aa65ea59b8f1a4186377
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Andrew Wong