Skip to content
Snippets Groups Projects
Commit bd827887 authored by Nicolas Noble's avatar Nicolas Noble Committed by GitHub
Browse files

Merge pull request #9414 from jboeuf/fix_alpn_msan

Fixing msan issue in client_ssl.c
parents c2bc59b2 f575369d
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,8 @@ static int alpn_select_cb(SSL *ssl, const uint8_t **out, uint8_t *out_len,
bool grpc_exp_seen = false;
bool h2_seen = false;
const char *inp = (const char *)in;
for (int i = 0; i < (int)in_len; ++i) {
const char *in_end = inp + in_len;
while (inp < in_end) {
const size_t length = (size_t)*inp++;
if (length == strlen("grpc-exp") && strncmp(inp, "grpc-exp", length) == 0) {
grpc_exp_seen = true;
......@@ -117,6 +118,7 @@ static int alpn_select_cb(SSL *ssl, const uint8_t **out, uint8_t *out_len,
inp += length;
}
GPR_ASSERT(inp == in_end);
GPR_ASSERT(grpc_exp_seen);
GPR_ASSERT(h2_seen);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment