Subject: fuzzyocr: Warnings while scanning PDFs Package: fuzzyocr Version: 3.6.0-3 Severity: normal
*** Please type your report below this line *** Occasionally I receive an email with PDF attachment that causes SpamAssassin to spew out the following Perl warnings: spamd: Use of uninitialized value $file in concatenation (.) or string at /usr/share/perl5/FuzzyOcr.pm line 382. spamd: Use of uninitialized value $file in concatenation (.) or string at /usr/share/perl5/FuzzyOcr.pm line 383. spamd: Use of uninitialized value $mimetype in pattern match (m//) at /usr/share/perl5/FuzzyOcr.pm line 396. spamd: Use of uninitialized value in pattern match (m//) at /usr/share/perl5/FuzzyOcr.pm line 400. spamd: Use of uninitialized value $mimetype in concatenation (.) or string at /usr/share/perl5/FuzzyOcr.pm line 406. spamd: Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/FuzzyOcr.pm line 722. spamd: FuzzyOcr: Cannot exec pdftops, skipping image spamd: FuzzyOcr: Cannot exec pstopnm, skipping image spamd: FuzzyOcr: Cannot exec pdfinfo, skipping image I have discused this with upstream and the fix is in the main FuzzyOCR.pm code, adding a missing hash member 'delete' statement when skipping PDF types, just like what happens with all the other skipped types. Attached is a one-liner patch. Thanks! -- System Information: Debian Release: 6.0.2 APT prefers stable APT policy: (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages fuzzyocr depends on: ii giflib-tools 4.1.6-9 library for GIF images (utilities) ii gifsicle 1.60-1 Tool for manipulating GIF images ii gocr 0.48-1 A command line OCR ii libdbd-mysql-perl 4.016-1 Perl5 database interface to the My ii libmldbm-sync-perl 0.30-3 Perl module for safe concurrent ac ii libstring-approx-perl 3.26-1 Perl extension for approximate mat ii libtie-cache-perl 0.17-4 perl Tie::Cache - LRU Cache in Mem ii netpbm 2:10.0-12.2+b1 Graphics conversion tools between ii ocrad 0.17-4 Optical Character Recognition prog ii perl [libdigest-md5-pe 5.10.1-17squeeze2 Larry Wall's Practical Extraction ii spamassassin 3.3.1-1 Perl-based spam filter using text ii tesseract-ocr-eng 2.00-2 tesseract-ocr language files for E fuzzyocr recommends no packages. fuzzyocr suggests no packages. -- no debconf information -- Gerald Turner Email: [email protected] JID: [email protected] GPG: 0xFA8CD6D5 21D9 B2E8 7FE7 F19E 5F7D 4D0C 3FA0 810F FA8C D6D5
diff -ur fuzzyocr-3.6.0.orig/FuzzyOcr.pm fuzzyocr-3.6.0/FuzzyOcr.pm
--- fuzzyocr-3.6.0.orig/FuzzyOcr.pm 2011-07-15 11:34:42.000000000 -0700
+++ fuzzyocr-3.6.0/FuzzyOcr.pm 2011-07-15 11:33:12.000000000 -0700
@@ -261,6 +261,7 @@
if ($imgfiles{$filename}{ftype} == 6) {
unless ($conf->{focr_scan_pdfs}) {
infolog("Skipping PDF file: PDF Scanning was disabled in config");
+ delete $imgfiles{$filename};
next;
}
} else {
pgpivOXvcx89J.pgp
Description: PGP signature

