summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2024-05-13 17:16:16 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2024-05-13 17:19:45 -0400
commit9d3b012ac06cec18e9128e87bc866169613925dc (patch)
tree2441469e2ab2b682b2e144fb71aff4e6cf89c5bf
parent556b466f05ac373b45bcf60e55f8c0acb64411d2 (diff)
downloadrockbox-9d3b012ac0.tar.gz
rockbox-9d3b012ac0.zip
[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
-rw-r--r--apps/gui/skin_engine/skin_tokens.c2
1 files changed, 1 insertions, 1 deletions
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--;
}
}