diff options
author | 2022-03-04 00:16:51 +0100 | |
---|---|---|
committer | 2022-03-04 00:36:06 +0100 | |
commit | a146a985b9d6142b57d78b1bf9a4ab461b7f10dc (patch) | |
tree | 551fff38f9d98640309fa6188c2d26b1c2d61880 /src | |
parent | drop redundant whitelisting (#5005) (diff) | |
download | firejail-a146a985b9d6142b57d78b1bf9a4ab461b7f10dc.tar.gz firejail-a146a985b9d6142b57d78b1bf9a4ab461b7f10dc.tar.zst firejail-a146a985b9d6142b57d78b1bf9a4ab461b7f10dc.zip |
xdg macros: don't fall through if directory not found (#4994)
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/macros.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/firejail/macros.c b/src/firejail/macros.c index 11385143a..fc0cd355c 100644 --- a/src/firejail/macros.c +++ b/src/firejail/macros.c | |||
@@ -154,7 +154,7 @@ static char *resolve_hardcoded(char *entries[]) { | |||
154 | struct stat s; | 154 | struct stat s; |
155 | 155 | ||
156 | int i = 0; | 156 | int i = 0; |
157 | while (entries[i] != NULL) { | 157 | while (i < MAX_TRANSLATIONS && entries[i] != NULL) { |
158 | if (asprintf(&fname, "%s/%s", cfg.homedir, entries[i]) == -1) | 158 | if (asprintf(&fname, "%s/%s", cfg.homedir, entries[i]) == -1) |
159 | errExit("asprintf"); | 159 | errExit("asprintf"); |
160 | 160 | ||