Bug 145177 - iconv.patch breaks mail notification message
Summary: iconv.patch breaks mail notification message
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tcsh
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact: Bill Huang
URL:
Whiteboard:
: 145195 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-01-15 00:11 UTC by Steve Mead
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version: 6.13-10
Clone Of:
Environment:
Last Closed: 2005-01-15 17:09:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Mead 2005-01-15 00:11:20 UTC
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.
mail.

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 ") : "");
    else
        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):
tcsh-6.13-9

How reproducible:
Always

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.
mail.

Expected Results:  You have new mail.

Additional info:

Comment 1 Miloslav Trmač 2005-01-15 14:25:21 UTC
*** Bug 145195 has been marked as a duplicate of this bug. ***

Comment 2 Miloslav Trmač 2005-01-15 17:09:35 UTC
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.