aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/php/ext
diff options
context:
space:
mode:
authorGravatar Zhouyihai Ding <ddyihai@google.com>2018-01-23 20:53:53 -0800
committerGravatar Zhouyihai Ding <ddyihai@google.com>2018-01-23 20:53:53 -0800
commitf09c294a245cb0084a8205ce04bc81e0bd85ae9f (patch)
tree0b83e64ff29c58cb196ba043b6e10e921d7e2087 /src/php/ext
parent1d8ab5a9165717b93255336b6d1b25174f7d998c (diff)
php: fix channel_credentials hashkey size error
Diffstat (limited to 'src/php/ext')
-rw-r--r--src/php/ext/grpc/channel_credentials.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c
index ed74b991bd..9d68cfc3e4 100644
--- a/src/php/ext/grpc/channel_credentials.c
+++ b/src/php/ext/grpc/channel_credentials.c
@@ -153,7 +153,7 @@ PHP_METHOD(ChannelCredentials, createSsl) {
}
php_grpc_int hashkey_len = root_certs_length + cert_chain_length;
- char *hashkey = emalloc(hashkey_len);
+ char *hashkey = emalloc(hashkey_len + 1);
if (root_certs_length > 0) {
strcpy(hashkey, pem_root_certs);
}