diff options
author | Craig Tiller <ctiller@google.com> | 2017-01-27 16:07:01 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-01-27 16:07:01 -0800 |
commit | d9b2d94c687ccb5b46ed4c4c3d1167ebec380d7d (patch) | |
tree | 5a292078ee6b243f20e21fea60fef9e72228bccc /test/core/handshake/client_ssl.c | |
parent | faa835c308ad7c107f08d9065d24dfc589b1cb20 (diff) | |
parent | 46357c882df1afc28f7a5228c40fde522093fa32 (diff) |
Merge github.com:grpc/grpc into large_message_benchmarks
Diffstat (limited to 'test/core/handshake/client_ssl.c')
-rw-r--r-- | test/core/handshake/client_ssl.c | 4 |
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); |