allocating correct size in why2_get_authority_cert_path
This commit is contained in:
parent
a42764f6d6
commit
d799ff1e0c
@ -191,7 +191,7 @@ char *why2_get_client_config_path(void)
|
||||
char *why2_get_authority_cert_path(char *username)
|
||||
{
|
||||
char *buffer = config_path(AUTHORITY);
|
||||
char *path = why2_malloc(strlen(buffer) + strlen(username) + strlen(WHY2_CHAT_AUTHORITY_CERTS_EXTENSION) + 2);
|
||||
char *path = why2_malloc(strlen(buffer) + strlen(username) + strlen(WHY2_CHAT_AUTHORITY_CERTS_EXTENSION) + 3);
|
||||
|
||||
//GET THE FILE
|
||||
sprintf(path, "%s/%s%s%c", buffer, username, WHY2_CHAT_AUTHORITY_CERTS_EXTENSION, '\0');
|
||||
|
Loading…
x
Reference in New Issue
Block a user