Description of problem: Patch mailx-8.1.1-bug44798.patch which was accepted without testing in 2004 turned working code into malfunctioning code. But at least the compiler warning about "dangerous" code disappeared! Version-Release number of selected component (if applicable): mailx-8.1.1-46 How reproducible: Always Steps to Reproduce: 1. read mailx-8.1.1-bug44798.patch 2. 3. Actual results: mail file not correctly edited Expected results: mail file should be correctly edited Additional info: The patch introduced the following: tempfd = mkstemp(tempname); obuf = Fopen(tempname, "w") but the Fopen will always fail because mkstemp() just created the file! So remainder of edstop() function never executes. Obviously the patch should have replaced Fopen(tempname,..) with Fdopen(tempfd,...). It has taken 3 years for anybody to detect this glaring error in this obviously untested patch. That should be worth something. At least the compiler doesn't generate error message about possibly "dangerous" code any more. Pity it doesn't emit error messages about possible "malfunctioning" code.
Thanks for your bug report. Fopen(tempname,..) command is right there (see man 3p fopen) problems are: open file descriptor tempfd which is not closed here and mkstemp command outuput is not tested here - fixed in mailx-8.1.1-47.fc9.