Bug 145177 - iconv.patch breaks mail notification message
iconv.patch breaks mail notification message
Product: Fedora
Classification: Fedora
Component: tcsh (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Bill Huang
: 145195 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-01-14 19:11 EST by Steve Mead
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: 6.13-10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-01-15 12:09:35 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Mead 2005-01-14 19:11:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
Normally, tcsh will print out the message "You have new mail." when
new mail arrives.  With the iconv.patch applied, the message is
corrupted to:

You have You have %smail.

The bit of code that prints the message can be found at sh.c:2334

    if (cnt == 1)
	xprintf(CGETS(11, 5, "You have %smail.\n"),
		new ? CGETS(11, 6, "new ") : "");
        xprintf(CGETS(11, 7, "You have %smail in %s.\n"),
		new ? CGETS(11, 6, "new ") : "", filename);

After application of the iconv.patch, CGETS() gets defined to
iconv_catgets(), which the patch adds to sh.func.c.  However,
iconv_catgets() uses a static buffer pointer for the destination
string so any call to xprintf() that calls CGETS() multiple times will
get corrupted output.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. set mail = (10 /var/mail/$USER)
2. Send yourself mail.
3. Wait for more than 10 seconds and hit enter to get the message
before the next prompt.

Actual Results:  You have You have %smail.

Expected Results:  You have new mail.

Additional info:
Comment 1 Miloslav Trmač 2005-01-15 09:25:21 EST
*** Bug 145195 has been marked as a duplicate of this bug. ***
Comment 2 Miloslav Trmač 2005-01-15 12:09:35 EST
Fixed in tcsh-6.13-10, which should appear in rawhide soon.
Thanks for your report.

Note You need to log in before you can comment on or make changes to this bug.