Justin/Theo, do these changes look good? Maybe I'm being paranoid
as the die() statements seem hard to reach, but I'm paranoid. ;-)
Index: lib/Mail/SpamAssassin/Message/Node.pm
===================================================================
--- lib/Mail/SpamAssassin/Message/Node.pm (revision 165034)
+++ lib/Mail/SpamAssassin/Message/Node.pm (working copy)
@@ -485,7 +485,8 @@
return Mail::SpamAssassin::Util::qp_decode($data);
}
else {
- die "message: unknown encoding type '$cte' in RFC2047 header";
+ warn "message: unknown encoding type '$cte' in RFC2047 header";
+ return $data;
}
}
Index: lib/Mail/SpamAssassin/Conf/Parser.pm
===================================================================
--- lib/Mail/SpamAssassin/Conf/Parser.pm (revision 165034)
+++ lib/Mail/SpamAssassin/Conf/Parser.pm (working copy)
@@ -272,6 +272,8 @@
$self->{currentfile}.": if ".$cond->{conditional}."\n";
}
else {
+ # die seems a bit excessive here, but this shouldn't be possible
+ # so I suppose it's okay.
die "config: unknown 'if' type: ".$cond->{type}."\n";
}
@@ -366,7 +368,9 @@
}
if (!$cmd->{code}) {
- $self->setup_default_code_cb ($cmd);
+ if (! $self->setup_default_code_cb($cmd)) {
+ goto failed_line;
+ }
}
my $ret = &{$cmd->{code}} ($conf, $cmd->{setting}, $value, $line);
@@ -560,8 +564,10 @@
$cmd->{code} = \&set_template_append;
}
else {
- die "config: unknown conf type $type!";
+ warn "config: unknown conf type $type!";
+ return 0;
}
+ return 1;
}
sub set_numeric_value {
--
Daniel Quinlan
http://www.pathname.com/~quinlan/