aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2017-01-20 10:58:04 -0800
committerGravatar GitHub <noreply@github.com>2017-01-20 10:58:04 -0800
commitbd827887ffbb57a95990130f585913b13f44a5b7 (patch)
treec3c7e43a7356d4f3653a4d4b138d904fe8184ac9 /test
parentc2bc59b2b0de079c64a2e544354b699685ea2853 (diff)
parentf575369d054c358543ccc431d3ad84d83fc2114d (diff)
Merge pull request #9414 from jboeuf/fix_alpn_msan
Fixing msan issue in client_ssl.c
Diffstat (limited to 'test')
-rw-r--r--test/core/handshake/client_ssl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/core/handshake/client_ssl.c b/test/core/handshake/client_ssl.c
index 24281e0b41..613251b835 100644
--- a/test/core/handshake/client_ssl.c
+++ b/test/core/handshake/client_ssl.c
@@ -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);