dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 2627553b5ac9596aa094e8a82bd18f48819dbf41
parent 4a3633acf8b566e584f57934ab77057497a4b355
Author: Marc Andre Tanner <mat@brain-dump.org>
Date:   Sat,  9 Mar 2013 22:08:08 +0100

Use "safer" string functions inorder to please the OpenBSD linker

Signed-off-by: Marc Andre Tanner <mat@brain-dump.org>

Diffstat:
vt.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vt.c b/vt.c @@ -1598,7 +1598,7 @@ static void send_curs(Vt *t) { Buffer *b = t->buffer; char keyseq[16]; - sprintf(keyseq, "\e[%d;%dR", (int)(b->curs_row - b->lines), b->curs_col); + snprintf(keyseq, sizeof keyseq, "\e[%d;%dR", (int)(b->curs_row - b->lines), b->curs_col); vt_write(t, keyseq, strlen(keyseq)); } @@ -2178,7 +2178,7 @@ void vt_init(void) if (term) strncpy(vt_term, term, sizeof(vt_term) - sizeof(color_suffix)); if (COLORS >= 256) - strcat(vt_term, color_suffix); + strncat(vt_term, color_suffix, sizeof(color_suffix) - 1); } void vt_shutdown(void)