Skip to content

Commit

Permalink
Various bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fkoyer committed Dec 10, 2023
1 parent 19a00b1 commit bc6de32
Show file tree
Hide file tree
Showing 11 changed files with 993 additions and 997 deletions.
920 changes: 440 additions & 480 deletions dist/PDFInfo2.pm

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lib/Mail/SpamAssassin/PDF/Context/Info.pm
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,19 @@ sub parse_end {
# Start at beginning, get comments + first object
$md5->reset();
$core->pos(0);
my $line;
my $line; my $pos = 0;
while (defined($line = $core->get_line())) {
next if $line =~ /^\s*$/; # skip blank lines
last unless $line =~ /^%/;
# print "> $line\n";
$md5->add($line);
$pos += length($line);
}

if ( $line =~ /^\s*(\d+ \d+ obj\s*)/g ) {
# print "> $1\n";
$md5->add($1); # include object number
$parser->{core}->pos($pos + $+[0]);
my $obj = $parser->{core}->get_primitive();
my $str = $self->serialize_fuzzy($obj);
# print "> $str\n";
Expand Down
Loading

0 comments on commit bc6de32

Please sign in to comment.