Commit 05b36b48 authored by Gaël PORTAY's avatar Gaël PORTAY
Browse files

Turn ChanSess's cmd attribute into char *

parent be3016b8
......@@ -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 */
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment