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/qt | |
parent | fcef6dbc15ef9630832697b9ebf80f05f20efda8 (diff) |
net: Avoid using C-style NUL-terminated strings as arguments in the netbase interface
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/optionsdialog.cpp | 2 | ||||
-rw-r--r-- | src/qt/rpcconsole.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index 2f612664df..8ee6c947e6 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -375,7 +375,7 @@ QValidator::State ProxyAddressValidator::validate(QString &input, int &pos) cons { Q_UNUSED(pos); // Validate the proxy - CService serv(LookupNumeric(input.toStdString().c_str(), DEFAULT_GUI_PROXY_PORT)); + CService serv(LookupNumeric(input.toStdString(), DEFAULT_GUI_PROXY_PORT)); proxyType addrProxy = proxyType(serv, true); if (addrProxy.IsValid()) return QValidator::Acceptable; diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 3dd64c5273..b87be65f5e 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -1240,7 +1240,7 @@ void RPCConsole::unbanSelectedNode() QString strNode = nodes.at(i).data().toString(); CSubNet possibleSubnet; - LookupSubNet(strNode.toStdString().c_str(), possibleSubnet); + LookupSubNet(strNode.toStdString(), possibleSubnet); if (possibleSubnet.IsValid() && m_node.unban(possibleSubnet)) { clientModel->getBanTableModel()->refresh(); |