From b450707955677917fd2687d5d5d6700ce9d59930 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Mon, 4 May 2020 14:38:47 -0400 Subject: skins: Fix buffer overflow in skin_error_format_message() Change-Id: I54849866c163f2ec7ab9c9f76cfe1b267a4bee56 --- lib/skin_parser/skin_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/skin_parser/skin_debug.c b/lib/skin_parser/skin_debug.c index 43cd746253..ff26819bc0 100644 --- a/lib/skin_parser/skin_debug.c +++ b/lib/skin_parser/skin_debug.c @@ -322,7 +322,7 @@ void skin_error_format_message(void) text[i++] = '.'; text[i++] = '.'; text[i++] = '.'; - for (j=error_col-10; error_line_start[j] && error_line_start[j] != '\n'; j++) + for (j=error_col-10; j < len && error_line_start[j] && error_line_start[j] != '\n'; j++) text[i++] = error_line_start[j]; text[i] = '\0'; error_col = 18; -- cgit v1.2.3