forked from enlightenment/efl
ecore_con: Check for the valid port number
Summary: This patch checks whether the port number is valid or not. The valid port number is an unsigned 16-bit integer, so 1-65535. 0 is reserved already. Test Plan: Execute test suite Reviewers: cedric, raster, stefan, Jaehyun_Cho Reviewed By: raster Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D5761
This commit is contained in:
parent
426ccba6bd
commit
1837253935
|
@ -1671,6 +1671,8 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
|
|||
Eo *loop;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);
|
||||
/* The allowable port number is an unsigned 16-bit integer, so 1-65535, 0 is reserved */
|
||||
if (port < 0 || port > 65535) return NULL;
|
||||
|
||||
type = compl_type & ECORE_CON_TYPE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue