File: bug1091683-pdfinfo.patch

package info (click to toggle)
spamassassin 4.0.1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 22,960 kB
  • sloc: perl: 86,207; ansic: 5,193; sh: 3,710; javascript: 339; sql: 279; makefile: 209; python: 49
file content (21 lines) | stat: -rw-r--r-- 955 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Description: Upstream fix for bug #1091683 (PDFInfo.pm)
Origin: upstream, https://svn.apache.org/viewvc?view=revision&revision=1919365
Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8304
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091683
Index: spamassassin/lib/Mail/SpamAssassin/Plugin/PDFInfo.pm
===================================================================
--- spamassassin.orig/lib/Mail/SpamAssassin/Plugin/PDFInfo.pm
+++ spamassassin/lib/Mail/SpamAssassin/Plugin/PDFInfo.pm
@@ -334,7 +334,11 @@ sub _get_pdf_details {
         $location = _parse_string($1);
       }
       if (not defined($location) or index($location, '.') <= 0) {
-        $location = _parse_string($2);
+	if(defined $2) {
+          $location = _parse_string($2);
+        } else {
+	  next;
+	}
       }
       next unless index($location, '.') > 0; # ignore some binary mess
       next if $location =~ /\0/; # ignore urls with NUL characters