forked from enlightenment/efl
ethumbd - fix possible out of bounds access to work table
this should fix CID 1039314 in case an unsused table slot cannot be found. this should actualyl never happen because table expands/allocs zero out new entires so they are "unused".
This commit is contained in:
parent
abb780bf5f
commit
83615efe6a
|
@ -811,6 +811,12 @@ _ethumb_table_append(Ethumbd *ed)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i >= q->max_count)
|
||||||
|
{
|
||||||
|
CRIT("cannot find free table slot in table of %i", q->max_count);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/%d", _ethumb_dbus_path, i);
|
snprintf(buf, sizeof(buf), "%s/%d", _ethumb_dbus_path, i);
|
||||||
q->table[i].used = 1;
|
q->table[i].used = 1;
|
||||||
q->table[i].path = eina_stringshare_add(buf);
|
q->table[i].path = eina_stringshare_add(buf);
|
||||||
|
|
Loading…
Reference in New Issue