summaryrefslogtreecommitdiff
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-9d3b012ac06cec18e9128e87bc866169613925dc.tar.gz
rockbox-9d3b012ac06cec18e9128e87bc866169613925dc.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)
107 break; 107 break;
108 108
109 last_sep = sep - 1; 109 last_sep = sep - 1;
110 if (*last_sep != '/') /* ignore multiple separators */ 110 if (last_sep < path || *last_sep != '/') /* ignore multiple separators */
111 level--; 111 level--;
112 } 112 }
113 } 113 }