Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We pass the file contents to the Postgres scanner, which assumes it is given a string as input. As such, it uses `strlen`. `mmap` doesn't provide us with a terminal null character, so we rely on empty pages to provide this. In the case of the `incremental_sort.sql` test, it is 12288 bytes, a multiple of exactly 3 of the typical 4096 page size. As such, this test ends up not getting *any* null terminators from `mmap`, so reading can overrun the buffer. Now, we just use a plain read and append `0` to the buffer to avoid the problem.
- Loading branch information