Bug 15878 - setlocale behavior shouldn't depend on the current locale
Summary: setlocale behavior shouldn't depend on the current locale
Status: NEW
Alias: None
Product: glibc
Classification: Unclassified
Component: locale (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-22 10:33 UTC by Alexandre Oliva
Modified: 2015-08-27 22:16 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Oliva 2013-08-22 10:33:26 UTC
alias_compare calls strcasecmp instead of using the C locale, so the behavior of setlocale WRT alias comparison will depend on what the active locale is.  read_alias_file, one of the functions that calls the above, also calls isspace while parsing the alias file, which again brings in locale-dependent behavior into what locale will become effective.
Comment 1 Andreas Schwab 2014-06-05 14:46:23 UTC
The first issue has already been fixed long ago.  The latter isn't a real issue as the locale.alias file isn't supposed to contain non-ASCII whitespace.