When built with FTS5, a heap buffer overflow occurs in the `fts5MergeRowidLists()` function. This happens because the output buffer is undersized when merging prefix doclists where `detail=none`. An attacker can exploit this by populating a `detail=none` FTS5 table with negative rowids and executing a prefix MATCH query, allowing them to write past the allocation, corrupt heap memory, and crash the process.