ethumb - fix idx range check

fix CID 1402612
This commit is contained in:
Carsten Haitzler 2020-09-19 23:15:44 +01:00
parent d64d4568bd
commit ec4076b895
1 changed files with 2 additions and 0 deletions

View File

@ -183,6 +183,8 @@ _ec_op_new(struct _Ethumbd_Child *ec)
r = _ec_read_safe(stdin, &idx, sizeof(idx));
if (!r)
return 0;
if ((idx < 0) || (idx >= NETHUMBS))
return 0;
DBG("ethumbd new(). idx = %d", idx);