forked from enlightenment/efl
evas cserver client tool - handle possible < 0 sized return
this is cserver so its trusted but handle possible < 0 size msg. address coverity CID1361243
This commit is contained in:
parent
2bcb4105e1
commit
b26bef48f2
|
@ -435,6 +435,11 @@ int main(void)
|
|||
|
||||
if ((t=recv(s, &size, sizeof(size), MSG_DONTWAIT)) > 0)
|
||||
{
|
||||
if (size < 0)
|
||||
{
|
||||
printf("got a message claiming < 0 size payload!\n");
|
||||
continue;
|
||||
}
|
||||
len = recv(s, msgbuf, size, 0);
|
||||
printf("size of received message: %d\n", len);
|
||||
if (len != size)
|
||||
|
|
Loading…
Reference in New Issue