The cmbtshp.lbx images have huge values for leadin, which makes me question
my interpretation of the value.
tmp.leadin = letohs(tmp.leadin); tmp.foff += sizeof tmp.leadin;
tmp.flags = letohs(tmp.flags); tmp.foff += sizeof tmp.flags;
- /* Format constraints. */
- if (tmp.frames <= tmp.leadin) {
- lbx_errno = LBX_EFORMAT;
- return NULL;
- }
-
/*
* DEBUG ONLY. These assertions exist to catch otherwise valid image
* files which differ from what I believe to be true of all LBX images.
* assumptions.
*/
_lbx_assert(tmp.wtf1 == 0);
+ _lbx_assert(tmp.frames > tmp.leadin); /* cmbtshp.lbx breaks this. */
_lbx_assert(!(tmp.flags & ~(FLAG_PALETTE|FLAG_OVERWRITE|FLAG_LOOPING)));
new = malloc(sizeof *new + (tmp.frames+1) * sizeof *new->offsets);