Bug 1471 - mbrtowc does not set output wchar when converting null char
Summary: mbrtowc does not set output wchar when converting null char
Status: RESOLVED FIXED
Alias: None
Product: uClibc
Classification: Unclassified
Component: Locales (show other bugs)
Version: 0.9.30.3
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-01 03:29 UTC by Michael Deutschmann
Modified: 2010-11-24 19:59 UTC (History)
1 user (show)

See Also:
Host: i386-pc-linux-uclibc
Target: i386-pc-linux-uclibc
Build: i386-pc-linux-uclibc


Attachments
Test for broken mbrtowc (300 bytes, text/plain)
2010-04-01 03:29 UTC, Michael Deutschmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Deutschmann 2010-04-01 03:29:00 UTC
Created attachment 1441 [details]
Test for broken mbrtowc

The standards require mbrtowc to store an output value in the provided wchar_t pointer in all non-error conditions.  But uClibc does not do this when converting the terminating zero of a string, instead leaving whatever garbage was previously there alone.

This causes GNU tar 1.23 to assertion-fail in some cases.

A simple demonstration is attached.
Comment 1 Bernhard Reutner-Fischer 2010-11-24 19:59:34 UTC
Fixed in 86b4bf7d3194a06281f053be341031d9196874c2
Thanks for the report!