Thread: Aura H2O AutoShelf beta
View Single Post
Old 07-01-2020, 01:38 PM   #175
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
OK, this is a bug in busybox shell. Old version of busybox returned string length in bytes, now it returns string length in characters. However, when using substring indexing, it still expects a byte offset, which is now impossible to determine. Given the wrong byte offset, it ends up cutting into multibyte characters and mangling them.

It worked fine in the old busybox (using bytes everywhere), works fine in Bash (using characters everywhere), doesn't work in current busybox (mixed bytes and characters).

It works fine for ascii only files and folders, as characters and bytes are identical there.

To fix, I'll have to rewrite without relying on the shell string manipulation functions.
frostschutz is offline   Reply With Quote