summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2020-08-30 20:22:49 +0000
committerStefan Schmidt <stefan@datenfreihafen.org>2020-08-31 11:16:40 +0200
commit07d6a25c2060487014f3dcb19271935114af588a (patch)
treecabbfc349e338747442a05bbd19a6094a190f677
parent4098515779869ce121374c98c82947aeda7436ba (diff)
elm_theme: more secure check extension as '.edj' and not 'edj'
Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D12121
-rw-r--r--src/lib/elementary/elm_theme.c4
1 files 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)
911 snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s", home, file); 911 snprintf(buf, sizeof(buf), "%s/"ELEMENTARY_BASE_DIR"/themes/%s", home, file);
912 if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0)) 912 if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0))
913 { 913 {
914 if (eina_str_has_extension(file, "edj")) 914 if (eina_str_has_extension(file, ".edj"))
915 { 915 {
916 th = strdup(file); 916 th = strdup(file);
917 s = strrchr(th, '.'); 917 s = strrchr(th, '.');
@@ -929,7 +929,7 @@ elm_theme_name_available_list_new(void)
929 snprintf(buf, sizeof(buf), "%s/themes/%s", _elm_data_dir, file); 929 snprintf(buf, sizeof(buf), "%s/themes/%s", _elm_data_dir, file);
930 if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0)) 930 if ((!ecore_file_is_dir(buf)) && (ecore_file_size(buf) > 0))
931 { 931 {
932 if (eina_str_has_extension(file, "edj")) 932 if (eina_str_has_extension(file, ".edj"))
933 { 933 {
934 int dupp; 934 int dupp;
935 935