Bug 812067

Summary: Treats "\x26" as "&"
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: sedAssignee: Martin Bříza <mbriza>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: brianna007, mbriza, pbonzini, vvitek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-19 15:08:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 807446    

Description Tim Waugh 2012-04-12 16:55:31 UTC
Description of problem:
This command gives unexpected output:

echo 12 | sed -e "s/\x31\x32/\x33\x26/g"

Version-Release number of selected component (if applicable):
sed-4.2.1-7.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1.echo 12 | sed -e "s/\x31\x32/\x33\x26/g"
  
Actual results:

312

Expected results:

3&

for comparision with:

$ echo 12 | sed -e "s/\x31\x32/\x33\x34/g"
34

Additional info:
The documentation says that "&" is treated as the matched string, and that \xXX is treated as the ASCII character given by the hex digits.

Comment 1 Paolo Bonzini 2012-04-23 15:58:27 UTC
Fixed by upstream commit 0f968ceb7bc1a65773979ef419872ce43677c790.

Comment 2 Martin Bříza 2012-06-06 13:20:02 UTC
The component has changed its owner to me, so I'm assigning the bug to myself.

Comment 3 Fedora Update System 2012-06-13 08:50:39 UTC
sed-4.2.1-9.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/sed-4.2.1-9.fc17

Comment 4 Martin Bříza 2012-06-13 08:57:32 UTC
Hello,

I'm submitting the updates for f16 and up right now, fixing this issue. The builds with this issue fixed will be sed-4.2.1-8.fc16, sed-4.2.1-9.fc17 and sed-4.2.1-9.fc18.

Thank you, Tim, for reporting. And you, Paolo, for fixing the bug and pointing me to the commit.

Comment 5 Fedora Update System 2012-06-13 08:59:15 UTC
sed-4.2.1-8.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/sed-4.2.1-8.fc16

Comment 6 Brianna 2012-06-13 14:26:35 UTC
This bug seems to have be the cause of my printing issues in Bug #807446.   I have updated to the latest version of sed (sed-4.2.1-8.fc16.x86_64) and so far printing seems to be working as expected. 

Thanks everyone for your hard work!

Comment 7 Fedora Update System 2012-06-15 00:23:44 UTC
Package sed-4.2.1-8.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing sed-4.2.1-8.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-9376/sed-4.2.1-8.fc16
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2012-06-19 15:08:26 UTC
sed-4.2.1-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2012-06-22 08:29:25 UTC
sed-4.2.1-9.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.