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 <t...@apache.org>
---
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 <andrew.w...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>

Reply via email to