[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox-cvs
Subject: [Bug 11436] New: ash ${var/X/$c} skips replacement bytes
From: bugzilla () busybox ! net
Date: 2018-10-25 17:33:17
Message-ID: bug-11436-161 () https ! bugs ! busybox ! net/
[Download RAW message or body]
https://bugs.busybox.net/show_bug.cgi?id=11436
Bug ID: 11436
Summary: ash ${var/X/$c} skips replacement bytes
Product: Busybox
Version: 1.29.x
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned@busybox.net
Reporter: Andreas.Klauer@metamorpher.de
CC: busybox-cvs@busybox.net
Target Milestone: ---
busybox:
~ $ var=fooXbar
~ $ echo ${var/X/$(printf "\x33\x88\x33\x88")}
foo33bar
~ $ echo ${var/X/$(printf "\x33\x88\x33\x88")} | hexdump -C
00000000 66 6f 6f 33 33 62 61 72 0a |foo33bar.|
00000009
why is 0x88 skipped?
these bytes appear in some UTF-8 characters.
using
https://busybox.net/downloads/binaries/1.28.1-defconfig-multiarch/busybox-x86_64
it even segfaults
~ $ x=x
~ $ echo ${x/x/裁}
Segmentation fault
but in my local version it just removes a byte
$ echo ${x/x/裁}
è
as a workaround, I no longer use ${/} to replace characters.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
busybox-cvs mailing list
busybox-cvs@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic