Turn ChanSess's cmd attribute into char *

This commit is contained in:
Gaël PORTAY 2015-05-02 23:28:28 +02:00
parent be3016b8d5
commit 05b36b484e
2 changed files with 2 additions and 2 deletions

View File

@ -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 */

View File

@ -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);