aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanley.cheung@gmail.com>2018-01-24 10:58:47 -0800
committerGravatar GitHub <noreply@github.com>2018-01-24 10:58:47 -0800
commitd29d709b35969d9a022905056c90d2d1bcec9b8f (patch)
tree958e9997209d0829fa911f55229e8b1e9cb0f65a
parent5e7eed29ed747a24a91c3d202066e64d0478d5db (diff)
parentf09c294a245cb0084a8205ce04bc81e0bd85ae9f (diff)
Merge pull request #14161 from ZhouyihaiDing/channel_hashkey_size
php: fix channel_credentials hashkey size error
-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 6ae21eac62..624d7cc75c 100644
--- a/src/php/ext/grpc/channel_credentials.c
+++ b/src/php/ext/grpc/channel_credentials.c
@@ -157,7 +157,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);
}