ecore_con - give error output if port num is invalid

This commit is contained in:
Carsten Haitzler 2018-01-26 01:03:44 +09:00
parent c07a40c745
commit eb951e99a6
1 changed files with 5 additions and 1 deletions

View File

@ -1672,7 +1672,11 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
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;
if ((port < 0) || (port > 65535))
{
ERR("Port %i invalid (0 <= port <= 65535)");
return NULL;
}
type = compl_type & ECORE_CON_TYPE;