diff --git a/fizz/protocol/ech/Encryption.cpp b/fizz/protocol/ech/Encryption.cpp index 57b079a1c51..71d8d80a08f 100644 --- a/fizz/protocol/ech/Encryption.cpp +++ b/fizz/protocol/ech/Encryption.cpp @@ -489,7 +489,8 @@ size_t calculateECHPadding( auto sni = getExtension(chlo.extensions); if (sni) { // Add max(0, maxLen - len(server_name)) - size_t sniLen = sni->server_name_list[0].hostname->computeChainDataLength(); + size_t sniLen = + sni->server_name_list.at(0).hostname->computeChainDataLength(); if (sniLen < maxLen) { padding = maxLen - sniLen; }