aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Rubin <jeremy.l.rubin@gmail.com>2017-02-19 13:44:01 -0500
committerJeremy Rubin <jeremy.l.rubin@gmail.com>2017-07-08 13:33:01 -0700
commitac658e55ff75ed5689f87060087f2ed815c34fe0 (patch)
tree5109d48599afebee1365ba275b6afe0c6927559c
parentb6856ebedcd3a1c3cfed5397f477f869688a715b (diff)
Fix subscript[0] in torcontrol
-rw-r--r--src/torcontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp
index 3665e7e770..ac13f73e70 100644
--- a/src/torcontrol.cpp
+++ b/src/torcontrol.cpp
@@ -662,7 +662,7 @@ void TorController::protocolinfo_cb(TorControlConnection& _conn, const TorContro
// _conn.Command("AUTHENTICATE " + HexStr(status_cookie.second), boost::bind(&TorController::auth_cb, this, _1, _2));
cookie = std::vector<uint8_t>(status_cookie.second.begin(), status_cookie.second.end());
clientNonce = std::vector<uint8_t>(TOR_NONCE_SIZE, 0);
- GetRandBytes(&clientNonce[0], TOR_NONCE_SIZE);
+ GetRandBytes(clientNonce.data(), TOR_NONCE_SIZE);
_conn.Command("AUTHCHALLENGE SAFECOOKIE " + HexStr(clientNonce), boost::bind(&TorController::authchallenge_cb, this, _1, _2));
} else {
if (status_cookie.first) {