Commit Graph

4 Commits

Author SHA1 Message Date
Carsten Haitzler f56e33f429 evas - gif loader - be a little more optimal in pixel lookups on decode 2016-04-02 13:32:36 +09:00
Carsten Haitzler dd90b6afad evas: gif loader - fix out of bounds access on cmap of invalid pixels
if gif has example 4 colors in colormap, pixels provided still can
hold values higher than 3 (4, 8, 255 etc.) ass a pixel is still a
byte. it should not, but it could. technically it'd be nice for gitlib
to pad its palette out to 256 entires to ensure this cant be a
problem, but it doesn't have to , so make a local copy of the cmap
when decoding pixels and pad out to 256 entires (using color 0 as any
value > pallette ize is invalid anyway so any color will do).

this fixes a possible security attack vector in reading memory out of
bounds of an allocated array. not very far out of bounds - but enough
to cause a crash - ie a dos attack, (not to inject code though).

@fix
2016-04-02 13:32:28 +09:00
Stefan Schmidt 6939963e76 gif loader: use Eina_Bool for one-bit bitfield
Make sure we are using a unsigned var here. Best go with a Eina_Bool directly.
2015-11-13 13:00:04 +01:00
Bogdan Devichev 043055fc8e evas: preparation of places for model_saver_loader separated from image_saver_loader. 2014-12-23 21:13:43 +01:00