summaryrefslogtreecommitdiff
path: root/src/lib/eio
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-07-10 11:39:44 -0700
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-10 21:10:23 +0200
commitfce5645d804a8971dd27542c979dd27a7aa8bc1a (patch)
treecf8c8839c5f25e58cc051fcea80b63da3ce9d11d /src/lib/eio
parent4e4210b0f349e08cf71a71c3e4a72f65cfd2535e (diff)
efl: use eina_streq for all property operation in model to avoid crash on NULL property name.
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D9266
Diffstat (limited to 'src/lib/eio')
-rw-r--r--src/lib/eio/efl_io_model.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c
index 3513852145..824a27c8a8 100644
--- a/src/lib/eio/efl_io_model.c
+++ b/src/lib/eio/efl_io_model.c
@@ -66,7 +66,7 @@ _already_added(Efl_Io_Model_Data *pd, const char *path)
66 66
67 EINA_LIST_FOREACH(pd->files, node, mi) 67 EINA_LIST_FOREACH(pd->files, node, mi)
68 { 68 {
69 if (!strcmp(mi->path, path)) 69 if (eina_streq(mi->path, path))
70 return EINA_TRUE; 70 return EINA_TRUE;
71 } 71 }
72 return EINA_FALSE; 72 return EINA_FALSE;
@@ -99,7 +99,7 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
99 obj = pd->self; 99 obj = pd->self;
100 100
101 path = ecore_file_dir_get(ev->filename); 101 path = ecore_file_dir_get(ev->filename);
102 if (strcmp(pd->path, path) != 0) 102 if (!eina_streq(pd->path, path))
103 goto end; 103 goto end;
104 104
105 spath = eina_stringshare_add(ev->filename); 105 spath = eina_stringshare_add(ev->filename);
@@ -698,7 +698,7 @@ _efl_io_model_efl_model_property_get(const Eo *obj, Efl_Io_Model_Data *pd, const
698 698
699 for (i = 0; i < EINA_C_ARRAY_LENGTH(properties); ++i) 699 for (i = 0; i < EINA_C_ARRAY_LENGTH(properties); ++i)
700 if (property == properties[i].name || 700 if (property == properties[i].name ||
701 !strcmp(property, properties[i].name)) 701 eina_streq(property, properties[i].name))
702 return properties[i].cb(obj, pd); 702 return properties[i].cb(obj, pd);
703 703
704 return efl_model_property_get(efl_super(obj, EFL_IO_MODEL_CLASS), property); 704 return efl_model_property_get(efl_super(obj, EFL_IO_MODEL_CLASS), property);
@@ -718,7 +718,7 @@ _efl_io_model_efl_model_property_set(Eo *obj,
718 if (!property) goto on_error; 718 if (!property) goto on_error;
719 719
720 err = EFL_MODEL_ERROR_NOT_SUPPORTED; 720 err = EFL_MODEL_ERROR_NOT_SUPPORTED;
721 if (strcmp(property, "path") != 0) goto on_error; 721 if (!eina_streq(property, "path")) goto on_error;
722 722
723 if (finalized && pd->request.move) goto on_error; 723 if (finalized && pd->request.move) goto on_error;
724 724