e sys inout - abort on messages more than 1m in size

i never see a need for messages more than 1m in size so lets just
abort on them to limit abuse

fixes T8677
This commit is contained in:
Carsten Haitzler 2020-04-22 13:00:55 +01:00
parent 5fb2fccd70
commit ac37da4167
1 changed files with 5 additions and 0 deletions

View File

@ -72,6 +72,11 @@ _cb_stdio_in_read(void *data EINA_UNUSED, Ecore_Fd_Handler *fd_handler EINA_UNUS
ERR("Invalid message payload size (less than 0)\n");
abort();
}
if (head.size > (1024 * 1024))
{
ERR("Invalid message payload size (more than 1M)\n");
abort();
}
buf = NULL;
if (head.size > 0)
{