Bug 203357 - buggy regexp in perl5/5.8.5/i386-linux-thread-multi/Encode/Alias.pm causes warning
buggy regexp in perl5/5.8.5/i386-linux-thread-multi/Encode/Alias.pm causes wa...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: perl (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
David Lawrence
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-21 10:16 EDT by Peter Bieringer
Modified: 2010-10-22 01:44 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:08:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Bieringer 2006-08-21 10:16:51 EDT
Description of problem:
A not proper regexp in Alias.pm causes an error message.

Version-Release number of selected component (if applicable):
perl-5.8.5-36.RHEL4

How reproducible:
always

Steps to Reproduce:
1. Create simple test program:
$ cat <<END >ldaptest.pl
#!/usr/bin/perl -W -T

use Net::LDAP;

print "Test\n";
END

2. chmod u+x ldaptest.pl

3. Run program
  
Actual results:
$ ./ldaptest.pl
False [] range "\s-" in regex; marked by <-- HERE in m/\bkoi8[\s- <-- HERE
_]*([ru])$/ at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Encode/Alias.pm line
196.
Test


Expected results:
No such warning.

Additional info:

$ grep -C 10  bkoi8 /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Encode/Alias.pm

    # Mac Mappings
    # predefined in *.ucm; unneeded
    # define_alias( qr/\bmacIcelandic$/i => '"macIceland"');
    define_alias( qr/^mac_(.*)$/i => '"mac$1"');
    # Ououououou. gone.  They are differente!
    # define_alias( qr/\bmacRomanian$/i => '"macRumanian"');

    # Standardize on the dashed versions.
    # define_alias( qr/\butf8$/i  => '"utf-8"' );
    define_alias( qr/\bkoi8[\s-_]*([ru])$/i => '"koi8-$1"' ); <-!!!

    unless ($Encode::ON_EBCDIC){
        # for Encode::CN
        define_alias( qr/\beuc.*cn$/i        => '"euc-cn"' );
        define_alias( qr/\bcn.*euc$/i        => '"euc-cn"' );
        # define_alias( qr/\bGB[- ]?(\d+)$/i => '"euc-cn"' )
        # CP936 doesn't have vendor-addon for GBK, so they're identical.
        define_alias( qr/^gbk$/i => '"cp936"');
        # This fixes gb2312 vs. euc-cn confusion, practically
        define_alias( qr/\bGB[-_ ]?2312(?!-?raw)/i => '"euc-cn"' );

Following patch will help:

--- /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Encode/Alias.pm.orig  
2006-08-21 16:08:13.000000000 +0200
+++ /usr/lib/perl5/5.8.5/i386-linux-thread-multi/Encode/Alias.pm       
2006-08-21 16:08:35.000000000 +0200
@@ -193,7 +193,7 @@

     # Standardize on the dashed versions.
     # define_alias( qr/\butf8$/i  => '"utf-8"' );
-    define_alias( qr/\bkoi8[\s-_]*([ru])$/i => '"koi8-$1"' );
+    define_alias( qr/\bkoi8[\s\-_]*([ru])$/i => '"koi8-$1"' );

     unless ($Encode::ON_EBCDIC){
         # for Encode::CN
Comment 1 Peter Bieringer 2006-08-25 08:09:08 EDT
/usr/lib/perl5/5.8.8/i386-linux-thread-multi/Encode/Alias.pm  (version 2.4) of
FC5 has fixed this (while RHEL4 contains version 2.0).
Comment 2 Robin Norwood 2006-08-25 16:28:09 EDT
We'll see about getting it into the next update release of RHEL4.
Comment 3 RHEL Product and Program Management 2006-09-05 15:31:24 EDT
The component this request has been filed against is not planned for inclusion
in the next update. The decision is based on weighting the priority and number
of requests for a component as well as the impact on the Red Hat Enterprise
Linux user-base: other components are considered having higher priority and the
number of changes we intend to include in update cycles is limited.
Comment 4 RHEL Product and Program Management 2006-09-05 15:45:21 EDT
Product Management has reviewed and declined this request.  You may appeal this
decision by reopening this request. 
Comment 5 Peter Bieringer 2006-09-07 02:19:09 EDT
I can't believe this decission!

A fix of one character in a currently buggy regular expression, which is also
fixed in later versions of the module and only suppress a warning message is
declined?

BTW: this warning fills my error log file every time a CGI is executed.

I will open a service request now!

BTW: someone locked this entry, I can't reopen it!
Comment 8 RHEL Product and Program Management 2008-09-05 13:07:53 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 13 errata-xmlrpc 2009-05-18 16:08:11 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0961.html

Note You need to log in before you can comment on or make changes to this bug.