Red Hat Bugzilla – Bug 145177
iconv.patch breaks mail notification message
Last modified: 2007-11-30 17:10:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
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
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):
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.
*** Bug 145195 has been marked as a duplicate of this bug. ***
Fixed in tcsh-6.13-10, which should appear in rawhide soon.
Thanks for your report.