diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-03-25 14:44:41 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-03-25 14:44:41 -0700 |
commit | e867baeae24107f211bc13908f022fd2117214d1 (patch) | |
tree | 8d6dd91ed9521326a24faa45ceb92e2d6c517789 /src | |
parent | ee8e2327cda0fd093cb6660f98cc43b4e8f23296 (diff) |
modules/compose: -EINVAL on empty layers setting
This resulted in a NULL ptr deref, simply treating as invalid
since what's the point of handling a composition devoid of any
layers - it's probably a mistake.
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/compose/compose.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/compose/compose.c b/src/modules/compose/compose.c index 0f6b8fc..9be4c0c 100644 --- a/src/modules/compose/compose.c +++ b/src/modules/compose/compose.c @@ -141,6 +141,9 @@ static int compose_setup(const til_settings_t *settings, til_setting_t **res_set return -ENOMEM; layer = strtok(toklayers, ":"); + if (!layer) + return -EINVAL; + do { char **new; size_t i; |