From 14cc4e43fe86223840c27d2616894fc098714b79 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 2 Jul 2019 18:25:02 +0300 Subject: [PATCH] Fix warning. GitOrigin-RevId: b0e7cb4a0906dd75fd87ade7a16dc8e697f0e5af --- td/mtproto/TlsInit.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/td/mtproto/TlsInit.cpp b/td/mtproto/TlsInit.cpp index 51ffb02b7..6f6c7f85d 100644 --- a/td/mtproto/TlsInit.cpp +++ b/td/mtproto/TlsInit.cpp @@ -12,6 +12,7 @@ #include "td/utils/Random.h" #include "td/utils/Span.h" +#include #include namespace td { @@ -376,8 +377,8 @@ Status TlsInit::wait_hello_response() { auto response = fd_.input_buffer().cut_head(it.begin().clone()).read_as_buffer_slice(); auto response_rand_slice = response.as_slice().substr(11, 32); auto response_rand = response_rand_slice.str(); - std::fill(response_rand_slice.begin(), response_rand_slice.end(), 0); - std::string hash_dest(32, 0); + std::fill(response_rand_slice.begin(), response_rand_slice.end(), '\0'); + std::string hash_dest(32, '\0'); hmac_sha256(password_, PSLICE() << hello_rand_ << response_rand_slice, hash_dest); if (hash_dest != response_rand) { return td::Status::Error("response hash mismatch");