You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fk...@apache.org on 2026/03/23 18:24:20 UTC
svn commit: r1932487 - spamassassin/trunk/lib/Mail/SpamAssassin
Author: fkento
Date: Mon Mar 23 18:24:20 2026
New Revision: 1932487
Log:
Fix uninitialized value warnings from queue-based MIME traversal
The queue-based tree walk bypassed find_parts(), which was responsible
for triggering lazy body parsing via parse_body(). Add explicit
parse_body() call before traversal to ensure the MIME tree is built.
Modified:
spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
Modified: spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm
==============================================================================
--- spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm Mon Mar 23 16:45:05 2026 (r1932486)
+++ spamassassin/trunk/lib/Mail/SpamAssassin/Message.pm Mon Mar 23 18:24:20 2026 (r1932487)
@@ -1282,6 +1282,9 @@ sub get_body_text_array_common {
my $scansize = $self->{body_part_scan_size};
my $preferred_alt = $self->{multipart_alternative_preferred_part};
+ # Ensure the MIME tree has been parsed
+ $self->parse_body() if exists $self->{'parse_queue'};
+
# the html metadata may have already been set, so let's not bother if it's
# already been done.
my $html_needs_setting = !exists $self->{metadata}->{html};