diff options
Diffstat (limited to 'test/core/httpcli')
-rw-r--r-- | test/core/httpcli/parser_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/core/httpcli/parser_test.c b/test/core/httpcli/parser_test.c index b96814dd41..f3f17e157f 100644 --- a/test/core/httpcli/parser_test.c +++ b/test/core/httpcli/parser_test.c @@ -159,7 +159,8 @@ int main(int argc, char **argv) { "hello world!"); tmp1 = gpr_malloc(2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH); - memset(tmp1, 'a', 2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH); + memset(tmp1, 'a', 2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH - 1); + tmp1[2 * GRPC_HTTPCLI_MAX_HEADER_LENGTH] = 0; gpr_asprintf(&tmp2, "HTTP/1.0 200 OK\r\nxyz: %s\r\n\r\n", tmp1); test_fails(split_modes[i], tmp2); gpr_free(tmp1); |