Bug 4655 - "copy" directives misparse
Summary: "copy" directives misparse
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-17 13:45 UTC by Pierre Habouzit
Modified: 2014-07-04 16:21 UTC (History)
2 users (show)

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


Attachments
proposed fix against 2.6 (412 bytes, patch)
2007-06-17 13:46 UTC, Pierre Habouzit
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Habouzit 2007-06-17 13:45:37 UTC
when there is directives before a "copy" directive and after a LC_COLLATE 
block, localedef misbehaves and isn't able to recurse more than one time.

Attached is a patch that fixes that.
Comment 1 Pierre Habouzit 2007-06-17 13:46:31 UTC
Created attachment 1893 [details]
proposed fix against 2.6
Comment 2 Pierre Habouzit 2007-06-17 14:13:43 UTC
ahem I made an error testing the patch, it does not work. But the bug is 
definitely here.
Comment 3 Ulrich Drepper 2007-06-17 16:49:00 UTC
You haven't shown any bug.  All locale files which come with glibc work.  I'll
close the bug unless you can show where the problem is.
Comment 4 Pierre Habouzit 2007-06-18 12:45:41 UTC
(In reply to comment #3)
> You haven't shown any bug.  All locale files which come with glibc work.  
I'll
> close the bug unless you can show where the problem is.

yes there is a locale failing in upstream glibc, it's am_ET that reads :

LC_COLLATE 
% 
%  The ETHIOPIC script declaration must come first. 
% 
script <ETHIOPIC> 
% 
% Copy the template from ISO/IEC 14651 
% 
copy "iso14651_t1" 
% 

the "script <ETHIOPIC>" breaks it all. It affects many locales that also copy 
am_ET (like eg gez_ER@abegede)
Comment 5 Ulrich Drepper 2007-10-02 04:29:00 UTC
The am_ET locale is wrong.  The new script must be defined after the copy.  This
now works fine.