[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pdf-devel] utils/pdf-filter.c: found 2 small problems/bugs?
From: |
Georg Gottleuber |
Subject: |
[pdf-devel] utils/pdf-filter.c: found 2 small problems/bugs? |
Date: |
Wed, 06 Jul 2011 12:20:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.17) Gecko/20110517 Lightning/1.0b2 Lanikai/3.1.10 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
while testing the prediction filter I found 2 small problems/bugs in
utils/pdf-filter.c:
1.) Calling ./pdf-filter with "--lzwenc --lzw-earlychange" the
earlychange arg is ignored. Because of the getopt_long loop design args
will only have an effect if named before the FILTER. Most simple fix
would be to make call convention [FILTER_ARGS FILTER]
instead of [FILTER FILTER_ARGS] (in the patch below)
But maybe it is more comfortable with some extra variables, so we can
call in any order. I can send a patch/merge directive for this too.
2.) Calling ./pdf-filter with stdin and (input length % BUF_SIZE == 0)
will run into a libgnupdf ASSERT, because fread returns 0 if stdin is
empty and puts this into pdf_stm_write call. (additional if added)
Patch to fix both problems is attached.
Regards,
Georg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk4UNuAACgkQ5sLITM1qIaILcACeIKwuo5lzmwD2SpNJGsF/nUta
xywAn2Ox8WWPzedMWKgfEEOYiyTS8VtT
=s9eB
-----END PGP SIGNATURE-----
pdf-filter.c.patch
Description: Text document
- [pdf-devel] utils/pdf-filter.c: found 2 small problems/bugs?,
Georg Gottleuber <=