From cf8a7156857f04c8fc506303ff8925b737dde62d Mon Sep 17 00:00:00 2001 From: Nick Bowler Date: Fri, 4 Jan 2008 14:53:52 -0500 Subject: [PATCH] "Downgrade" the nframes > leadin constraint to a format assertion. The cmbtshp.lbx images have huge values for leadin, which makes me question my interpretation of the value. --- src/image.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/image.c b/src/image.c index 15c7255..6c77ed3 100644 --- a/src/image.c +++ b/src/image.c @@ -71,12 +71,6 @@ struct lbx_image *lbximg_fopen(FILE *f) 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. @@ -84,6 +78,7 @@ struct lbx_image *lbximg_fopen(FILE *f) * 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); -- 2.43.2