ethumb - check inoput index from stdin

fix CID 1402646
This commit is contained in:
Carsten Haitzler 2020-09-19 23:03:20 +01:00
parent e243a60bb2
commit 99636bdd5f
1 changed files with 2 additions and 0 deletions

View File

@ -667,6 +667,8 @@ _ec_op_setup(struct _Ethumbd_Child *ec)
r = _ec_read_safe(stdin, &idx, sizeof(idx));
if (!r)
return 0;
if ((idx < 0) || (idx >= NETHUMBS))
return 0;
r = _ec_read_safe(stdin, &type, sizeof(type));
if (!r)