pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pdf-devel] Bug in LZW filter?


From: Georg Gottleuber
Subject: [pdf-devel] Bug in LZW filter?
Date: Fri, 02 Sep 2011 17:41:32 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.17) Gecko/20110705 Lightning/1.0b2 Lanikai/3.1.10

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have done some additional testing to the LZW filter and found 2
problems. I extracted a LZW stream of a PDF
(http://www.kripsy.de/texte/sp/rs_sit_kripsy.pdf) with

$ pdfshow -e -b  rs_sit_kripsy.pdf 3 > lzwstream

Decoding this with pdf-filter outputs a different result as with pdfshow
(MuPDF). (the first 400 byte are equal but pdfshow is right as it shows
the full text)

pdf-filter call:
$ ./pdf-filter -i lzwstream -o lzwdecoded --lzwdec --lzw-earlychange

pdfshow decode call:
$ pdfshow rs_sit_kripsy.pdf 3

Attached you find the lzwstream for input and both outputs.


If I call ./pdf-filter without --lzw-earlychange I get a Segmentation fault

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b73f2b in lzw_dict_decode (d=0x60fb68, code=411,
decode=0x60faf8, size=0x60fb00) at base/pdf-stm-f-lzw.c:325
325           *(*decode)-- = d->table[code].suffix;

I think the problem is that the code can not be found in the table
because of the missing earlychange parameter. (Of course an error
message would be better).

Regards,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5g+SwACgkQ5sLITM1qIaKzWgCgrIG2aBaG5LpfhaFwr6o9jbDB
NT8Amwf9KsCnRSIZydoo1NmY9ZaI+Mb7
=c0GQ
-----END PGP SIGNATURE-----

Attachment: lzw-filter-bug.tar.gz
Description: application/gzip


reply via email to

[Prev in Thread] Current Thread [Next in Thread]