[poppler] poppler/poppler: PDFDoc.cc,1.2,1.3

Albert Astals Cid aacid at kde.org
Sun Aug 7 23:01:58 EST 2005


Wouldn't be better starting to check from the end of eof and not for the st=
art=20
as %%EOF is supposed to be at the end of it?

Albert

A Diumenge 07 Agost 2005 07:51, Kristian H=C3=B8gsberg va escriure:
> Brad Hards wrote:
> > On Sun, 7 Aug 2005 08:59 am, Brad Hards wrote:
> >>On Sat, 6 Aug 2005 21:47 pm, Albert Astals Cid wrote:
> >>>Update of /cvs/poppler/poppler/poppler
> >>>In directory gabe:/tmp/cvs-serv16924/poppler
> >>>
> >>>Modified Files:
> >>>	PDFDoc.cc
> >>>Log Message:
> >>>Increase EOF searching up to last 1024 characters
> >>
> >>Hmm, that broke the qt4 unittests:
> >
> > Actually, looks like most of the problem is one file - orientation.pdf.
> > See
> > http://cvs.freedesktop.org/poppler/test/unittestcases/orientation.pdf?r=
ev
> >=3D1.1&view=3Dlog
> >
> > I think that the problem is that strstr() stops at the first 0x00, and
> > that file (plus a few others I found, mostly linearized and/or encrypte=
d)
> > do have embedded 0x00's. I hacked it (see below) to avoid putting those
> > into eof[], and it now Works For Me(tm).
> >
> > Should I commit this, ugly as it is?
>
> Hmm, I'd rather see something like
>
>     for (i =3D 0; i < len - 5; i++)
>       if (strncmp (eof + i, "%%EOF", 5) =3D=3D 0)
>         break;
>
> etc.
>
> Kristian
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler

		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es


More information about the poppler mailing list