diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2019-12-11 16:39:29 +0000 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2020-01-08 12:35:59 +0000 |
commit | 9574de86ad703ad942cdd0eca79f48c0d42b102b (patch) | |
tree | 54955eedefb9824d094f9e1e9d199274a6d3a7ec /src/net_permissions.cpp | |
parent | fcef6dbc15ef9630832697b9ebf80f05f20efda8 (diff) |
net: Avoid using C-style NUL-terminated strings as arguments in the netbase interface
Diffstat (limited to 'src/net_permissions.cpp')
-rw-r--r-- | src/net_permissions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net_permissions.cpp b/src/net_permissions.cpp index c3947173de..22fa5ee73b 100644 --- a/src/net_permissions.cpp +++ b/src/net_permissions.cpp @@ -71,7 +71,7 @@ bool NetWhitebindPermissions::TryParse(const std::string str, NetWhitebindPermis const std::string strBind = str.substr(offset); CService addrBind; - if (!Lookup(strBind.c_str(), addrBind, 0, false)) { + if (!Lookup(strBind, addrBind, 0, false)) { error = ResolveErrMsg("whitebind", strBind); return false; } @@ -94,7 +94,7 @@ bool NetWhitelistPermissions::TryParse(const std::string str, NetWhitelistPermis const std::string net = str.substr(offset); CSubNet subnet; - LookupSubNet(net.c_str(), subnet); + LookupSubNet(net, subnet); if (!subnet.IsValid()) { error = strprintf(_("Invalid netmask specified in -whitelist: '%s'").translated, net); return false; |