Bug 78662 - [PATCH] Metamail 2.7 incorrectly patched
Summary: [PATCH] Metamail 2.7 incorrectly patched
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-10 07:00 UTC by Mats Peterson
Modified: 2005-03-10 13:54 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (11.51 KB, patch)
2005-03-10 07:00 UTC, Mats Peterson
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mats Peterson 2005-03-10 07:00:15 UTC
        The file 'patch-af' for Metamail 2.7 replaces gets() with
        fgets() at several places in mailto.c and metamail.c.
        Unfortunately, the person who made the patch back in -95 seems
        to have overlooked the fact that fgets() retains the trailing
        newline character in the buffer, which leads to the test for
        string match in line 1809 of mailto.c (original source) never
        returning true.  Consequently, 'mailto' will report any manually
        entered content-type as not being listed in the local mailcap files.

	Since my original submission of the patch in 2002 (which went
	completely unprocessed), there has been another patch provided by
	a guy called Ulf Härnhammar.  His patch, however, doesn't correct
	the abovementioned issues.  I have included a patch that includes
	both my and Ulf's changes.

Fix: Below is an updated "patch-af" with additional code to make fgets()
        work as expected in both mailto.c and metamail.c, and including
	Ulf Härnhammar's changes.
How-To-Repeat:         When including non-text data with "~*" in the 'mailto' program,
        choose option 1 (Raw data from a file), and manually specify a
        content-type known to exist in the local mailcap files.
Comment 1 Volker Stolz freebsd_committer freebsd_triage 2005-03-10 13:54:08 UTC
State Changed
From-To: open->closed

Committed, thanks!