mirror of
https://github.com/clearml/dropbear
synced 2025-03-03 10:41:39 +00:00
Turn ChanSess's cmd attribute into char *
This commit is contained in:
parent
be3016b8d5
commit
05b36b484e
@ -39,7 +39,7 @@ struct exitinfo {
|
|||||||
|
|
||||||
struct ChanSess {
|
struct ChanSess {
|
||||||
|
|
||||||
unsigned char * cmd; /* command to exec */
|
char * cmd; /* command to exec */
|
||||||
pid_t pid; /* child process pid */
|
pid_t pid; /* child process pid */
|
||||||
|
|
||||||
/* pty details */
|
/* pty details */
|
||||||
|
@ -649,7 +649,7 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess,
|
|||||||
if (iscmd) {
|
if (iscmd) {
|
||||||
/* "exec" */
|
/* "exec" */
|
||||||
if (chansess->cmd == NULL) {
|
if (chansess->cmd == NULL) {
|
||||||
chansess->cmd = buf_getstring(ses.payload, &cmdlen);
|
chansess->cmd = (char *) buf_getstring(ses.payload, &cmdlen);
|
||||||
|
|
||||||
if (cmdlen > MAX_CMD_LEN) {
|
if (cmdlen > MAX_CMD_LEN) {
|
||||||
m_free(chansess->cmd);
|
m_free(chansess->cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user