fix(rizin): enforce UTF-8 recent output byte limit (#6314)

This commit is contained in:
Raj Aryan authored and GitHub committed 2026-10-23 01:29:54 +08:00
1 parent b9ca37b51f
commit e28c11f87d
2 files changed
+21 -1

No files matched your search

+1 -1
View File
@@ -1605,7 +1605,7 @@ const waitForCommandFrames = async (
}
};
const truncateUtf8 = (value: string, maximumBytes: number): string => {
export const truncateUtf8 = (value: string, maximumBytes: number): string => {
if (maximumBytes <= 0) return "";
// A UTF-16 code unit needs at most three UTF-8 bytes. Buffer.write stops
// before a partial character; only decode bytes it actually initialized.