forked from enlightenment/efl
Malloc cannot accept a negative number so check 'num' parameter before
calling malloc. Fixes Coverity CID1039352 Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
de13560056
commit
164269a2da
|
@ -1176,7 +1176,7 @@ ecore_con_event_client_data(Ecore_Con_Client *cl, unsigned char *buf, int num, E
|
|||
cl->host_server->event_count = eina_list_append(cl->host_server->event_count, e);
|
||||
_ecore_con_cl_timer_update(cl);
|
||||
e->client = cl;
|
||||
if (duplicate)
|
||||
if ((duplicate) && (num > 0))
|
||||
{
|
||||
e->data = malloc(num);
|
||||
if (!e->data)
|
||||
|
|
Loading…
Reference in New Issue