From 07d6a25c2060487014f3dcb19271935114af588a Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sun, 30 Aug 2020 20:22:49 +0000 Subject: [PATCH] elm_theme: more secure check extension as '.edj' and not 'edj' Reviewed-by: Stefan Schmidt Differential Revision: https://phab.enlightenment.org/D12121 --- src/lib/elementary/elm_theme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c index 13f41e1abc..8625cb6147 100644 --- a/src/lib/elementary/elm_theme.c +++ b/src/lib/elementary/elm_theme.c @@ -911,7 +911,7 @@ elm_theme_name_available_list_new(void) snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s", home, file); if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0)) { - if (eina_str_has_extension(file, "edj")) + if (eina_str_has_extension(file, ".edj")) { th = strdup(file); s = strrchr(th, '.'); @@ -929,7 +929,7 @@ elm_theme_name_available_list_new(void) snprintf(buf, sizeof(buf), "%s/themes/%s", _elm_data_dir, file); if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0)) { - if (eina_str_has_extension(file, "edj")) + if (eina_str_has_extension(file, ".edj")) { int dupp;