From 9574de86ad703ad942cdd0eca79f48c0d42b102b Mon Sep 17 00:00:00 2001 From: practicalswift Date: Wed, 11 Dec 2019 16:39:29 +0000 Subject: net: Avoid using C-style NUL-terminated strings as arguments in the netbase interface --- src/rpc/net.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/rpc') diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 5e53fa5f5d..e0c1976f1a 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -562,11 +562,11 @@ static UniValue setban(const JSONRPCRequest& request) if (!isSubnet) { CNetAddr resolved; - LookupHost(request.params[0].get_str().c_str(), resolved, false); + LookupHost(request.params[0].get_str(), resolved, false); netAddr = resolved; } else - LookupSubNet(request.params[0].get_str().c_str(), subNet); + LookupSubNet(request.params[0].get_str(), subNet); if (! (isSubnet ? subNet.IsValid() : netAddr.IsValid()) ) throw JSONRPCError(RPC_CLIENT_INVALID_IP_OR_SUBNET, "Error: Invalid IP/Subnet"); -- cgit v1.2.3