Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian....@packages.debian.org
Usertags: pu
X-Debbugs-Cc: spampr...@packages.debian.org
Control: affects -1 + src:spamprobe

[ Reason ]
Spamprobe is unmaintained upstream and in Debian.

In bookworm it has been crashing a lot when parsing images (#1037422)

The solution is relatively simple, add missing return statements to bool
functions, even though the return is ignored.

[ Impact ]
Spamprobe crashes enough in bookworm to not be useable.

[ Tests ]
Manually tested it on 600 odd spam emails that previously crashed it,
and it didn't crash.

[ Risks ]
Changes are very simple. The return values don't even matter, because
they are ignored.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
Add missing return values to bool functions.
diff -Nru spamprobe-1.4d/debian/changelog spamprobe-1.4d/debian/changelog
--- spamprobe-1.4d/debian/changelog     2023-02-20 18:12:05.000000000 +0530
+++ spamprobe-1.4d/debian/changelog     2023-09-26 12:15:17.000000000 +0530
@@ -1,3 +1,11 @@
+spamprobe (1.4d-16+deb12u1) bookworm; urgency=medium
+
+  * QA Upload.
+  * Patch: Add missing return statements, fixing crashes parsing JPEG
+    attachments. (Closes: #1037422)
+
+ -- Stefano Rivera <stefa...@debian.org>  Tue, 26 Sep 2023 12:15:17 +0530
+
 spamprobe (1.4d-16) unstable; urgency=medium
 
   * QA upload.
diff -Nru spamprobe-1.4d/debian/patches/missing-returns.patch 
spamprobe-1.4d/debian/patches/missing-returns.patch
--- spamprobe-1.4d/debian/patches/missing-returns.patch 1970-01-01 
05:30:00.000000000 +0530
+++ spamprobe-1.4d/debian/patches/missing-returns.patch 2023-09-26 
12:15:17.000000000 +0530
@@ -0,0 +1,47 @@
+Description: spamprobe crashes when parsing jpeg mime attachment
+Author: Torsten Hilbrich
+
+Bug-Debian: https://bugs.debian.org/1037422
+Bug-Upstream: https://sourceforge.net/p/spamprobe/bugs/39/
+Forwarded: https://sourceforge.net/p/spamprobe/bugs/39/
+
+--- a/src/parser/GifParser.cc
++++ b/src/parser/GifParser.cc
+@@ -91,6 +91,7 @@
+     openImage();
+     digestImage();
+     parseImageRecords();
++    return true;
+   } catch (runtime_error &ex) {
+     return false;
+   }
+--- a/src/parser/JpegParser.cc
++++ b/src/parser/JpegParser.cc
+@@ -61,6 +61,7 @@
+     initializeSource();
+     digestImage();
+     tokenizeImage();
++    return true;
+   } catch (runtime_error &ex) {
+     return false;
+   }
+--- a/src/parser/MbxMailMessageReader.cc
++++ b/src/parser/MbxMailMessageReader.cc
+@@ -86,6 +86,7 @@
+       cerr << "MBX: SKIPPED DELETED MESSAGE" << endl;
+     }
+   }
++  return true;
+ }
+ 
+ OWNED MailMessage *MbxMailMessageReader::readMessage()
+--- a/src/parser/PngParser.cc
++++ b/src/parser/PngParser.cc
+@@ -73,6 +73,7 @@
+   try {
+     digestImage();
+     initializeImage();
++    return true;
+   } catch (runtime_error &ex) {
+     return false;
+   }
diff -Nru spamprobe-1.4d/debian/patches/series 
spamprobe-1.4d/debian/patches/series
--- spamprobe-1.4d/debian/patches/series        2023-02-20 18:12:05.000000000 
+0530
+++ spamprobe-1.4d/debian/patches/series        2023-09-26 12:15:17.000000000 
+0530
@@ -7,3 +7,4 @@
 giflib5.diff
 gcc-11.patch
 fix-typos.patch
+missing-returns.patch

Reply via email to