From 5d787629a55cd4ec5ba577559d2c95cccd24282e Mon Sep 17 00:00:00 2001 From: Thomas Kerpe Date: Wed, 5 Jun 2019 15:59:16 +0200 Subject: Prevent a deadloop in PATH handling Empty PATH segments should no longer cause a deadloop. Fixes #59 --- client/bemenu-run.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/bemenu-run.c b/client/bemenu-run.c index 20efd77..4feacf9 100644 --- a/client/bemenu-run.c +++ b/client/bemenu-run.c @@ -66,6 +66,8 @@ get_paths(const char *env, const char *default_paths, struct paths *state) if ((f = strcspn(state->path, ":")) > 0) { state->path += f + (path[f] ? 1 : 0); path[f] = 0; + } else { + state->path += 1; } if (!*path) { -- cgit v1.2.3-70-g09d2