readtif: if getbit returns less than 0 during eol fill bits, return early

This commit is contained in:
ppatience0 2013-07-20 16:56:29 -04:00
parent 92b14e72b0
commit 0fc3aa99a1

View file

@ -672,8 +672,12 @@ geteol(Fax *f)
if(f->eol == nil) {
if(f->eolfill) {
for(i = 0; i < 4; i++)
(*f->getbit)(f);
for(i = 0; i < 4; i++) {
if((*f->getbit)(f) < 0) {
f->st = -1;
return nil;
}
}
}
if((p = gettab(f, 0)) == nil || p->run >= 0) {
werrstr("first eol");