From 43e3e5390861cebdc9f3c87ebf7ed1414cf9b596 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 24 Aug 2020 05:22:28 +0000 Subject: [PATCH] Do not run off end of string when stripping delays, reported by Dave Vandervies. --- tty-term.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tty-term.c b/tty-term.c index 3ccff2ff..5aac1e0c 100644 --- a/tty-term.c +++ b/tty-term.c @@ -302,6 +302,8 @@ tty_term_strip(const char *s) ptr++; if (*ptr == '>') ptr++; + if (*ptr == '\0') + break; } buf[len++] = *ptr;