From be97a18d8244969877adf7530e874693a68cfbd7 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 15 May 2026 10:34:30 -0400 Subject: [PATCH] android: Don't allow access to the asset tree with a path of "". Reference Issue #15587. --- src/core/android/SDL_android.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/android/SDL_android.c b/src/core/android/SDL_android.c index ad07f07ad1..a4c56f92bc 100644 --- a/src/core/android/SDL_android.c +++ b/src/core/android/SDL_android.c @@ -1902,6 +1902,11 @@ static APKNode *FindAPKChildNode(APKNode *parent, const char *child) static const APKNode *FindAPKNode(const char *constpath) { //SDL_Log("FindAPKNode('%s') ...", constpath); + + if (*constpath == '\0') { // don't allow paths of "". + return NULL; + } + if (SDL_strncmp(constpath, "assets://", 9) == 0) { constpath += 9; }