Commit Graph

2 Commits

Author SHA1 Message Date
Crypt Keeper
40341af448 fs: returns EBADF on negative file descriptor (#1391)
This changes file descriptors from uint32 to int32 and the
corresponding file table to reject negative values. This ensures
invalid values aren't mistaken for very large descriptor entries, which
can use a lot of memory as the table implementation isn't designed to
be sparse.

See https://pubs.opengroup.org/onlinepubs/9699919799/functions/dirfd.html#tag_16_90

Signed-off-by: Adrian Cole <adrian@tetrate.io>
2023-04-21 16:08:35 +02:00
Achille
9ebbb41adb sys.FileTable => descriptor.Table (#1155)
Signed-off-by: Achille Roussel <achille.roussel@gmail.com>
2023-02-24 08:37:24 +08:00