busybox: Fix unicode display bug

This commit is contained in:
Dylan Araps 2020-04-18 20:12:20 +03:00
parent 33c419aff1
commit 4a3ef41018
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
3 changed files with 24 additions and 0 deletions

View File

@ -2,6 +2,7 @@ d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998 busybox-1.31.1
09c2f601fec4e5c10664c22f787dafb9424efe219bf826727c356da90dfd60d5 adduser-no-setgid.patch
8d84b1719dca2a751c09072c20cd782a3c47f119a68d35316f89d851daf67b88 fsck-resolve-uuid.patch
0f54301a73af461e8066bc805b48d991cfed513d08a2f036e015b19f97cb424a modprobe-kernel-version.patch
68e0c7d5e96902d3b890e89d9b018ae11d53ed3104bfedd624a1485df58b11cb print-unicode.patch
05be5fde1da4b94bea5b2e6f5813873acd558c75508f9a772a71061f3c0d6a6f .config
b4479adaabffb1fe9af7db676929e8f5f6bbc47869c5309a19056aa66196fbce .config-suid
76978b2b69361d47b3bb314a8a320ca274b2af7339c571be1a19f0e1d8c4da6a acpid.run

View File

@ -0,0 +1,22 @@
diff --git a/libbb/printable_string.c b/libbb/printable_string.c
index a814fd0..f4c7b00 100644
--- a/libbb/printable_string.c
+++ b/libbb/printable_string.c
@@ -28,8 +28,6 @@ const char* FAST_FUNC printable_string2(uni_stat_t *stats, const char *str)
}
if (c < ' ')
break;
- if (c >= 0x7f)
- break;
s++;
}
@@ -42,7 +40,7 @@ const char* FAST_FUNC printable_string2(uni_stat_t *stats, const char *str)
unsigned char c = *d;
if (c == '\0')
break;
- if (c < ' ' || c >= 0x7f)
+ if (c < ' ')
*d = '?';
d++;
}

View File

@ -2,6 +2,7 @@ https://busybox.net/downloads/busybox-1.31.1.tar.bz2
patches/adduser-no-setgid.patch
patches/fsck-resolve-uuid.patch
patches/modprobe-kernel-version.patch
patches/print-unicode.patch
files/.config
files/.config-suid
files/acpid.run