normal/charset: Fix array out-of-bounds formatting unicode for display
In some cases attempting to display arbitrary binary strings leads to ASAN splats reading the widthspec array out of bounds. Check the index. If it would be out of bounds, return a width of 1. I don't know if that's strictly correct, but we're not really expecting great display of arbitrary binary data, and it's certainly not worse than an OOB read. Signed-off-by:Daniel Axtens <dja@axtens.net> Reviewed-by:
Daniel Kiper <daniel.kiper@oracle.com>
Please register or sign in to comment