summaryrefslogtreecommitdiff
path: root/src/lib/ecore_con
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-05-18 13:47:03 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-05-18 13:47:04 -0400
commit6fdc3794eb933ed28d29a0c8d1b206ddab61b836 (patch)
tree5550068844961eb6bb7541a17be9c84b6daa2aff /src/lib/ecore_con
parent27316746f55faef191b3a65d587e08d1da84ec4a (diff)
ecore_con: add check for invalid space("") name
Summary: space("") name check had existed, but it was removed on f4306d654dc55e8a0449698da18f371644d656df (in the _efl_network_connector_efl_object_finalize) This patch restore the safety checks Reviewers: barbieri, Hermet, Jaehyun_Cho, myoungwoon, zmike Reviewed By: zmike Subscribers: cedric, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6177
Diffstat (limited to 'src/lib/ecore_con')
-rw-r--r--src/lib/ecore_con/ecore_con_legacy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ecore_con/ecore_con_legacy.c b/src/lib/ecore_con/ecore_con_legacy.c
index a6246db..fdb4994 100644
--- a/src/lib/ecore_con/ecore_con_legacy.c
+++ b/src/lib/ecore_con/ecore_con_legacy.c
@@ -939,6 +939,8 @@ ecore_con_server_check(const Ecore_Con_Server *svr)
939static Ecore_Con_Server * 939static Ecore_Con_Server *
940_ecore_con_server_new(Eina_Bool is_dialer, Ecore_Con_Type type, const char *name, int port, const void *data) 940_ecore_con_server_new(Eina_Bool is_dialer, Ecore_Con_Type type, const char *name, int port, const void *data)
941{ 941{
942 EINA_SAFETY_ON_TRUE_RETURN_VAL(!name || (!name[0]), NULL);
943
942 Ecore_Con_Server *svr = calloc(1, sizeof(Ecore_Con_Server)); 944 Ecore_Con_Server *svr = calloc(1, sizeof(Ecore_Con_Server));
943 EINA_SAFETY_ON_NULL_RETURN_VAL(svr, NULL); 945 EINA_SAFETY_ON_NULL_RETURN_VAL(svr, NULL);
944 svr->start_time = ecore_time_get(); 946 svr->start_time = ecore_time_get();
@@ -2630,7 +2632,7 @@ ecore_con_lookup(const char *name, Ecore_Con_Dns_Cb done_cb, const void *data)
2630 .ai_flags = AI_ADDRCONFIG | AI_V4MAPPED | AI_CANONNAME, 2632 .ai_flags = AI_ADDRCONFIG | AI_V4MAPPED | AI_CANONNAME,
2631 }; 2633 };
2632 2634
2633 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE); 2635 EINA_SAFETY_ON_TRUE_RETURN_VAL(!name || (!name[0]), EINA_FALSE);
2634 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, EINA_FALSE); 2636 EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, EINA_FALSE);
2635 2637
2636 ctx = malloc(sizeof(Ecore_Con_Lookup_Ctx)); 2638 ctx = malloc(sizeof(Ecore_Con_Lookup_Ctx));