Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87429 - coreutils-5.2.1-r5 uses old i18n patch, cut -f1 fails with wide chars
Summary: coreutils-5.2.1-r5 uses old i18n patch, cut -f1 fails with wide chars
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 86352 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-31 08:52 UTC by Jonathan Briggs
Modified: 2005-05-19 13:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Briggs 2005-03-31 08:52:44 UTC
In cut_fields_mb in cut.c, wint_t wc is not initialized before being
compared to WEOF.  It just so happens that when I compile it on my
system, through some miracle of perversity and stack layout, wc picks up
-1 as its initial value.

On cut.c line 836, change wint_t wc; to wint_t wc = 0;  That fixes it
for me.

On the coreutils bug list I was told that this problem has already been fixed in Fedora Core 3 a while ago.  Maybe Gentoo's coreutils needs to get new versions of the i18n patch?

Reproducible: Always
Steps to Reproduce:
1.  Emerge coreutils with at least -O2 and gcc 3.4 or 4.0
Actual Results:  
echo foo:bar | cut -d: -f1 produces no output!

Expected Results:  
foo
Comment 1 SpanKY gentoo-dev 2005-04-01 20:31:19 UTC
5.2.1-r6 has the updated redhat patch
Comment 2 Jonathan Briggs 2005-04-04 08:51:34 UTC
*** Bug 86352 has been marked as a duplicate of this bug. ***
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-05-19 11:04:37 UTC
*** Bug 93234 has been marked as a duplicate of this bug. ***
Comment 4 foser (RETIRED) gentoo-dev 2005-05-19 13:19:47 UTC
*** Bug 86352 has been marked as a duplicate of this bug. ***