mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-04 19:55:19 +00:00
android: Don't allow access to the asset tree with a path of "".
Reference Issue #15587.
This commit is contained in:
parent
e1fa336ac4
commit
be97a18d82
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue