php: fix channel_credentials hashkey size error

pull/14161/head
Zhouyihai Ding 7 years ago
parent 1d8ab5a916
commit f09c294a24
  1. 2
      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);
}

Loading…
Cancel
Save