aboutsummaryrefslogtreecommitdiff
path: root/src/auth.c
diff options
context:
space:
mode:
authorXiang Xiao <xiaoxiang@xiaomi.com>2021-05-09 23:53:28 +0800
committerAndreas Schneider <asn@cryptomilk.org>2021-05-27 13:45:47 +0200
commitd2182bb7af28894245fe877b4bef7340c8b0a009 (patch)
treebf8689cdfdbff9f762423b23439f5b81a7d3265c /src/auth.c
parentae44d846b86d495e4e8d68a33bcc2532365e6ac5 (diff)
downloadlibssh-d2182bb7af28894245fe877b4bef7340c8b0a009.tar.gz
libssh-d2182bb7af28894245fe877b4bef7340c8b0a009.tar.xz
libssh-d2182bb7af28894245fe877b4bef7340c8b0a009.zip
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
Diffstat (limited to 'src/auth.c')
-rw-r--r--src/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/auth.c b/src/auth.c
index fcf39b7a..001368ee 100644
--- a/src/auth.c
+++ b/src/auth.c
@@ -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,