1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-28 01:41:48 +03:00

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

@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <sys/select.h>
#include <sys/time.h>
@ -297,7 +298,7 @@ static void shell(ssh_session session)
static void batch_shell(ssh_session session)
{
ssh_channel channel;
char buffer[1024];
char buffer[PATH_MAX];
size_t i;
int s = 0;