Skip to content

Commit 56dc261

Browse files
authored
Fix tolower with sanitizer cfi (#208)
1 parent 0a7c200 commit 56dc261

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

trantor/net/TcpClient.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void TcpClient::enableSSL(
238238
std::transform(hostname.begin(),
239239
hostname.end(),
240240
hostname.begin(),
241-
tolower);
241+
[](unsigned char c) { return tolower(c); });
242242
SSLHostName_ = std::move(hostname);
243243
}
244244

trantor/net/inner/TcpConnectionImpl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ void TcpConnectionImpl::startClientEncryption(
554554
std::transform(hostname.begin(),
555555
hostname.end(),
556556
hostname.begin(),
557-
tolower);
557+
[](unsigned char c) { return tolower(c); });
558558
assert(sslEncryptionPtr_ != nullptr);
559559
sslEncryptionPtr_->hostname_ = hostname;
560560
}

0 commit comments

Comments
 (0)