RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1256495 - Multibyte character string after $1-9 in ksh is not expanded correctly.
Summary: Multibyte character string after $1-9 in ksh is not expanded correctly.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ksh
Version: 6.4
Hardware: All
OS: All
medium
low
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: Martin Kyral
Milan Navratil
URL:
Whiteboard:
Depends On:
Blocks: 1254457 1269889
TreeView+ depends on / blocked
 
Reported: 2015-08-24 18:19 UTC by Paulo Andrade
Modified: 2019-10-10 10:06 UTC (History)
4 users (show)

Fixed In Version: ksh-20120801-32.el6
Doc Type: Bug Fix
Doc Text:
Multibyte characters are no longer corrupted in KornShell Previously, the multibyte unicode parser received shifted input after a command-line option variable in KornShell (ksh). Consequently, the multibyte character after a command-line variable became corrupted. A patch has been applied to fix multibyte input parsing. As a result, multibyte characters are handled correctly in the described situation.
Clone Of:
: 1299484 (view as bug list)
Environment:
Last Closed: 2016-05-11 00:47:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
ksh-20120801-mb-after-argvar.patch (432 bytes, patch)
2015-08-24 18:19 UTC, Paulo Andrade
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0932 0 normal SHIPPED_LIVE ksh bug fix update 2016-05-10 22:54:18 UTC

Description Paulo Andrade 2015-08-24 18:19:33 UTC
Created attachment 1066573 [details]
ksh-20120801-mb-after-argvar.patch

This problem has been reported upstream at
http://lists.research.att.com/pipermail/ast-users/2015q3/004775.html

"""
 Hi,

  I have this test case from a user, where ksh changed behavior
from ksh-20100621 to ksh-20120801.

  The test case is these 2 files:

$ cat test1.sh
#!/bin/ksh
echo "$1テスト"
echo "${1}テスト"
echo "$1test"

and

$ cat test2.sh
#!/bin/ksh
echo "$1テスト" | od -x
echo "${1}テスト" | od -x
echo "$1test" | od -x

  They output:
$ ksh ./test1.sh
�スト
テスト
test
$ ksh ./test2.sh
0000000 e386 b982 83e3 0a88
0000010
0000000 83e3 e386 b982 83e3 0a88
0000012
0000000 6574 7473 000a
0000005

  Previously ksh, in src/cmd/ksh93/sh/macro.c:varsub()
was:

    c = fcget();
    if(type>M_TREE)
...
    nulflg = 0;
    if(type && c==':')
...
    if(type)
...
    else
    {
        fcseek(-1);
        c=0;
    }
    if(c==':')  /* ${name:expr1[:expr2]} */

  The code in newer ksh is almost identical, with the
exception that instead of "c = fcget();" it starts with:

    c = fcmbget(&LEN);

that causes it to read 3 characters, but only "backtrack"
one character in the given test case.

  The attached patch corrects the problem, should be
simple enough, and only use the previous behavior when
the condition in the test case is met.

Thanks,
Paulo
"""

Comment 5 errata-xmlrpc 2016-05-11 00:47:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0932.html


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