Fix buffer overflow in termemu

This commit is contained in:
Kevin Lange 2014-05-30 21:20:13 -07:00
parent 41b7bb88f7
commit e157147550

View File

@ -34,6 +34,7 @@ static void ansi_dump_buffer(term_state_t * s) {
/* Add to the internal buffer for the ANSI parser */
static void ansi_buf_add(term_state_t * s, char c) {
if (s->buflen >= TERM_BUF_LEN-1) return;
s->buffer[s->buflen] = c;
s->buflen++;
s->buffer[s->buflen] = '\0';