[Xapian-tickets] [Xapian] #651: Protect writable fds by setting filepos very high
Xapian
nobody at xapian.org
Tue May 28 06:54:15 BST 2024
#651: Protect writable fds by setting filepos very high
---------------------------+-------------------------------
Reporter: Olly Betts | Owner: Olly Betts
Type: enhancement | Status: assigned
Priority: normal | Milestone: 2.0.0
Component: Backend-Glass | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
---------------------------+-------------------------------
Comment (by Olly Betts):
I wondered about mingw. There's no pread/pwrite there it seems, but we
can `lseek` to the max off_t value and then `write()` fails with `EINVAL`
(tested with `_FILE_OFFSET_BITS` set to 64 which gives 64-bit `off_t`).
We could probably use `ReadFile()` and `WriteFile()` instead of
pread/pwrite.
--
Ticket URL: <https://trac.xapian.org/ticket/651#comment:20>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list