Skip to content

Commit

Permalink
url: verify domain is not empty after "ToASCII"
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Sep 8, 2020
1 parent 3d7899e commit d3aca25
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,8 @@ bool ToASCII(const std::string& input, std::string* output) {
MaybeStackBuffer<char> buf;
if (i18n::ToASCII(&buf, input.c_str(), input.length()) < 0)
return false;
if (buf.length() == 0)
return false;
output->assign(*buf, buf.length());
return true;
}
Expand Down

0 comments on commit d3aca25

Please sign in to comment.