It looks like if you feed in the byte sequence E3 81 BE E3 82 8A E3 82 84
UTF-8 encoding of まりや), then the loop
while( (p[n] & 0xc0)==0x80 ) n++;
in sqlite3Fts5IndexCharlenToBytelen will attempt to read past the end of
string when building 3-character prefixes.
I don't know what (if any) security/stability implications this
out-of-bounds read has, but it is
inconvenient to hit it when statically linking SQLite into an application
has ASan enabled (because it'll cause a program abort).
Please let me know if I can provide any additional information that would
with a fix.