Turn ChanSess's tty and term attributes into char *

This commit is contained in:
Gaël PORTAY
2015-05-02 16:01:13 +02:00
parent 7928d83b02
commit 9f97511356
2 changed files with 4 additions and 4 deletions

View File

@@ -567,7 +567,7 @@ static int sessionpty(struct ChanSess * chansess) {
return DROPBEAR_FAILURE;
}
chansess->term = buf_getstring(ses.payload, &termlen);
chansess->term = (char *) buf_getstring(ses.payload, &termlen);
if (termlen > MAX_TERM_LEN) {
/* TODO send disconnect ? */
TRACE(("leave sessionpty: term len too long"))
@@ -583,7 +583,7 @@ static int sessionpty(struct ChanSess * chansess) {
return DROPBEAR_FAILURE;
}
chansess->tty = (char*)m_strdup(namebuf);
chansess->tty = m_strdup(namebuf);
if (!chansess->tty) {
dropbear_exit("Out of memory"); /* TODO disconnect */
}