Package: spamassassin
Version: 3.4.6-1

OLEVBAMacro offers olemacro_zip_depth as a recursion limit, which has no effect in SA3. I propose to backport the SA4 fix.
diff --git a/debian/patches/fix-olemacro_zip_depth b/debian/patches/fix-olemacro_zip_depth
new file mode 100644
index 0000000..10bcb45
--- /dev/null
+++ b/debian/patches/fix-olemacro_zip_depth
@@ -0,0 +1,15 @@
+--- a/lib/Mail/SpamAssassin/Plugin/OLEVBMacro.pm
++++ b/lib/Mail/SpamAssassin/Plugin/OLEVBMacro.pm
+@@ -595,8 +595,10 @@
+   }
+   return 0 if $pms->{conf}->{olemacro_num_zip} == 0;
+ 
+-  $depth = $depth || 1;
+-  return 0 if ($depth > $pms->{conf}->{olemacro_zip_depth});
++  if (++$depth > $pms->{conf}->{olemacro_zip_depth}) {
++    dbg("Zip recursion limit exceeded");
++    return 0;
++  }
+ 
+   return 0 unless _is_zip_file($name, $data);
+   my $zip = _open_zip_handle($data);
diff --git a/debian/patches/series b/debian/patches/series
index 1891b96..a0bc92b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ debian_gitignore
 bug426031-pod-fix
 skip_config_tree_recurse_test
 upstream/bug_7848_Rule_parser_doesn_t_support_nested_if_ifplugins.patch
+fix-olemacro_zip_depth

Reply via email to