Replace the hardcode max path length with PATH_MAX

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: Icb1d36b48a759ec11dbaa4c09a39037a80ab0f85
This commit is contained in:
Xiang Xiao
2021-05-09 23:53:28 +08:00
committed by Andreas Schneider
parent ae44d846b8
commit d2182bb7af
5 changed files with 12 additions and 10 deletions

View File

@@ -1103,7 +1103,7 @@ int ssh_userauth_publickey_auto(ssh_session session,
while (state->it != NULL) {
const char *privkey_file = state->it->data;
char pubkey_file[1024] = {0};
char pubkey_file[PATH_MAX] = {0};
if (state->state == SSH_AUTH_AUTO_STATE_PUBKEY) {
SSH_LOG(SSH_LOG_DEBUG,