Skip to content

pacman/util.c: fix potential buffer overflow in string_length

Allan McRae requested to merge allan/string_length into master

A potential buffer overflow could occur if a detected terminal escape sequence was not for a terminal colour (i.e. did not contain an "m").

Fix the potential buffer overflow while explicitly detecting only terminal colour escape sequences. Any other escape sequence is unexpected, and just gets pushed to the terminal.

Signed-off-by: Allan McRae allan@archlinux.org

Merge request reports