diff --git a/src/shrpx_tls.cc b/src/shrpx_tls.cc index 83b148a6..c5625303 100644 --- a/src/shrpx_tls.cc +++ b/src/shrpx_tls.cc @@ -2041,7 +2041,7 @@ StringRef get_x509_serial(BlockAllocator &balloc, X509 *x) { auto n = BN_bn2bin(bn, b.data()); assert(n <= 20); - return util::format_hex(balloc, StringRef{b.data(), n}); + return util::format_hex(balloc, StringRef{b.data(), static_cast(n)}); } namespace {