From 45ce932fd09e6817545d40f11ec9dd2dc4531014 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Sat, 3 Feb 2024 15:00:56 +0000 Subject: [PATCH] pacman: check for end of string when stripping ascii escapes --- src/pacman/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/util.c b/src/pacman/util.c index ffdb38e8..8314ba03 100644 --- a/src/pacman/util.c +++ b/src/pacman/util.c @@ -462,7 +462,7 @@ static size_t string_length(const char *s) int iter = 0; for(; *s; s++) { if(*s == '\033') { - while(*s != 'm') { + while(*s != 'm' && *s != '\0') { s++; } } else {