diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 13:54:17 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-27 13:54:17 +0000 |
commit | 05b0054aa9d9d48f5a7ded8d8488088e441c6fba (patch) | |
tree | ba00bbf388ea2d96f2534832a89e5c61efa90475 /net/base/dns_util.cc | |
parent | c3f732b65c637b681d534975fdb09802bb65b58e (diff) | |
download | chromium_src-05b0054aa9d9d48f5a7ded8d8488088e441c6fba.zip chromium_src-05b0054aa9d9d48f5a7ded8d8488088e441c6fba.tar.gz chromium_src-05b0054aa9d9d48f5a7ded8d8488088e441c6fba.tar.bz2 |
net: include the root label in DNSDomainFromDot
I was previously sloppy with DNSDomainFromDot. Really it should have
included a terminating NUL in the result string to represent the root
label, but it actually omitted it because it was more convenient to
test that way. This CL fixes that.
BUG=none
TEST=net_unittests
http://codereview.chromium.org/3070002/show
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/dns_util.cc')
-rw-r--r-- | net/base/dns_util.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/base/dns_util.cc b/net/base/dns_util.cc index 87d1866..2305b7b 100644 --- a/net/base/dns_util.cc +++ b/net/base/dns_util.cc @@ -52,7 +52,7 @@ bool DNSDomainFromDot(const std::string& dotted, std::string* out) { return false; name[namelen++] = 0; - *out = name; + *out = std::string(name, namelen); return true; } |