From 9d3b012ac06cec18e9128e87bc866169613925dc Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Mon, 13 May 2024 17:16:16 -0400 Subject: [BugFix, Asan] skin_tokens.c get_dir path name underrun preventing multiple slashes reads prior to the buffer by 1 byte when only a single slash exists Change-Id: I1ce1dc8d754bf1c8798dc49f396c9142e4a6e49c --- apps/gui/skin_engine/skin_tokens.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 12277aa0ea..42c56f7203 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c @@ -107,7 +107,7 @@ char* get_dir(char* buf, int buf_size, const char* path, int level) break; last_sep = sep - 1; - if (*last_sep != '/') /* ignore multiple separators */ + if (last_sep < path || *last_sep != '/') /* ignore multiple separators */ level--; } } -- cgit v1.2.3