mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Three small changes from Tiago Cunha:
- Check for truncation when copying path. - Don't need to use a temporary buffer in screen_set_title. - Include strerror in output when connecting to server fails.
This commit is contained in:
parent
994cb872cf
commit
adc1f21eae
3 changed files with 8 additions and 7 deletions
6
screen.c
6
screen.c
|
|
@ -110,12 +110,8 @@ screen_set_cursor_colour(struct screen *s, const char *colour_string)
|
|||
void
|
||||
screen_set_title(struct screen *s, const char *title)
|
||||
{
|
||||
char tmp[BUFSIZ];
|
||||
|
||||
strlcpy(tmp, title, sizeof tmp);
|
||||
|
||||
free(s->title);
|
||||
s->title = xstrdup(tmp);
|
||||
s->title = xstrdup(title);
|
||||
}
|
||||
|
||||
/* Resize screen. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue