mirror of
https://github.com/ceph/ceph
synced 2025-01-11 13:41:02 +00:00
rbd: fix off-by-one error in key name
Fixes: #2846 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
e775ce52ab
commit
f22b95da27
@ -694,7 +694,7 @@ static int do_kernel_add(const char *poolname, const char *imgname,
|
||||
|
||||
oss << " name=" << user;
|
||||
|
||||
char key_name[strlen(user) + strlen("client.")];
|
||||
char key_name[strlen(user) + strlen("client.")+1];
|
||||
snprintf(key_name, sizeof(key_name), "client.%s", user);
|
||||
char secret_buf[MAX_SECRET_LEN];
|
||||
char *secret = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user