From 05b36b484e93557928d4ae90a7eea5a57764c372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= <gael.portay@gmail.com> Date: Sat, 2 May 2015 23:28:28 +0200 Subject: [PATCH] Turn ChanSess's cmd attribute into char * --- chansession.h | 2 +- svr-chansession.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chansession.h b/chansession.h index 66f5504f..6eb8c764 100644 --- a/chansession.h +++ b/chansession.h @@ -39,7 +39,7 @@ struct exitinfo { struct ChanSess { - unsigned char * cmd; /* command to exec */ + char * cmd; /* command to exec */ pid_t pid; /* child process pid */ /* pty details */ diff --git a/svr-chansession.c b/svr-chansession.c index c496ff91..a630112e 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -649,7 +649,7 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess, if (iscmd) { /* "exec" */ if (chansess->cmd == NULL) { - chansess->cmd = buf_getstring(ses.payload, &cmdlen); + chansess->cmd = (char *) buf_getstring(ses.payload, &cmdlen); if (cmdlen > MAX_CMD_LEN) { m_free(chansess->cmd); -- GitLab