Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 657288 - mail-filter/maildrop-2.9.0 reformime -x and no -s segfault in strtok()
Summary: mail-filter/maildrop-2.9.0 reformime -x and no -s segfault in strtok()
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-06-03 17:41 UTC by Thomas Petersen
Modified: 2018-12-25 19:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Fix segfault when not specifying mime sections with -s (section = NULL) (maildrop-2.9.0-reformime-segfault-strtok.patch,1022 bytes, patch)
2018-06-03 17:41 UTC, Thomas Petersen
Details | Diff
emerge --info (emerge-info.txt,7.72 KB, text/plain)
2018-06-03 17:44 UTC, Thomas Petersen
Details
Fix segfault when not specifying mime sections with -s (section = NULL) (maildrop-2.9.0-reformime-segfault-strtok.patch,681 bytes, patch)
2018-06-26 08:08 UTC, Thomas Petersen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Petersen 2018-06-03 17:41:07 UTC
Created attachment 534666 [details, diff]
Fix segfault when not specifying mime sections with -s (section = NULL)

reformime crash with segmentation fault in the do_extract part of main2() if no mime sections are specified with the -s option. In this case reformime is supposed to extract all sections.

The problem started after upgrading glibc. The improper use of the strtok function apparently worked before but now segfaults.

In the supplied patch I have simply used the same approach as in the doinfo part of main2. I put the same fix in dodecode as that would also crash if not specifying -s.
Comment 1 Thomas Petersen 2018-06-03 17:44:20 UTC
Created attachment 534668 [details]
emerge --info
Comment 2 Rolf Eike Beer archtester 2018-06-19 20:34:54 UTC
Have you reported this upstream?
Comment 3 nuitari 2018-06-25 13:11:51 UTC
Thank you Thomas, this fix fixed the maildrop issue I was having.
Comment 4 Thomas Petersen 2018-06-25 14:45:43 UTC
Now reported upstream:
https://github.com/svarshavchik/courier-libs/issues/8
Comment 5 Thomas Petersen 2018-06-26 08:07:02 UTC
The bug is now fixed upstream.
The change to the -e option is unnecessary.
Comment 6 Thomas Petersen 2018-06-26 08:08:12 UTC
Created attachment 537274 [details, diff]
Fix segfault when not specifying mime sections with -s (section = NULL)
Comment 7 Larry the Git Cow gentoo-dev 2018-12-25 19:29:50 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a9a1e95090d8c20172dbe7f51d267240cde2bd4

commit 7a9a1e95090d8c20172dbe7f51d267240cde2bd4
Author:     Tim Harder <radhermit@gentoo.org>
AuthorDate: 2018-12-25 19:18:21 +0000
Commit:     Tim Harder <radhermit@gentoo.org>
CommitDate: 2018-12-25 19:28:57 +0000

    mail-filter/maildrop: version bump to 3.0.0
    
    Closes: https://bugs.gentoo.org/582928
    Closes: https://bugs.gentoo.org/639124
    Closes: https://bugs.gentoo.org/657288
    
    Signed-off-by: Tim Harder <radhermit@gentoo.org>

 mail-filter/maildrop/Manifest                      |   1 +
 .../maildrop/files/maildrop-3.0.0-testsuite.patch  |  65 ++++++++++
 mail-filter/maildrop/maildrop-3.0.0.ebuild         | 140 +++++++++++++++++++++
 3 files changed, 206 insertions(+)