termux-app
termux-app copied to clipboard
[Bug]: Large amount of invisible unicode characters causes freeze and crash
Problem description
Printing a specific file to terminal freezes and crashes Termux. The file is valid UTF-8 but contains large amounts of various invisible Unicode characters, including zero-width spaces, word joiners, variant selectors, etc.
Steps to reproduce the behavior.
- Download https://kimapr.net/lappy/matroska.js
- Print it to the terminal using
cator similar
What is the expected behavior?
Termux does not freeze or crash
System information
- Termux application version: 0.118.0
- Android OS version: 11
- Device model: TECNO Spark 8C KG5j
Sent #3840 with a fix for the crash, but there's still something asymptotically disastrous going on here. I gave it 15+ minutes trying to print the bad line before ^C.