So this crash was being caused by parted/table.c calling wcswidth() as part of how it calculates how much whitespace to pad the column out with. It seems that wcswidth returns -1 if it finds a non printable character, which causes the padding to overflow the buffer and corrupt memory. I can fix that by switching to wcslen(), but then the columns are no longer lined up properly.
It appears this is because these Kanji(?) characters are actually extra wide, despite supposedly being a fixed width font. It seems as though wcswidth() knows this and takes it into account, but it blows up on non printable characters. Any idea how to get the correct width even with non printable characters present?
signature.asc
Description: OpenPGP digital signature

