On Mon, 2019-03-04 at 16:21 +0100, F. E. wrote: > empty1 and empty2 are two characters for holding CR('\r') and > LF('\n'). So when an xref entry > misses the CR (or the LF), empty2 will hold the first character of > the next xref entry. So why not check the two empty variables if they > hold the required characters and failing when they don't:
Hi, I'm fine with the change, but... > > if ( read != 5 || ( empty1 != '\r' ) || ( empty2 != '\n' ) ) > > > > Or a little bit less strict (allowing LF+CR): > > > if ( read != 5 || ( empty1 != '\r' && empty2 != 'r' ) || ( empty1 > > != '\n' && empty2 != '\n' ) ) ... if I understand that correctly, then the proposed change allows "\r\n" and "\n\r" as a line separator, which I do not think is a good idea, thus I'd be rather more strict, than less. There might be some tricks how to recover from broken XRef tables, which PoDoFo doesn't have many, if any at all. I do not know what others opinion is. Bye, zyx _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users