Commit graph

4 commits

Author SHA1 Message Date
Livia Medeiros
b3ec13d449
fs: adjust position validation in reading methods
This prohibits invalid values (< -1 and non-integers) and
allows `filehandle.read()` to handle position up to `2n ** 63n - 1n`

PR-URL: https://github.com/nodejs/node/pull/42835
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2023-09-29 10:56:07 +00:00
Livia Medeiros
050d974a25
test: use common.mustNotMutateObjectDeep() in fs tests
PR-URL: https://github.com/nodejs/node/pull/43819
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-24 14:29:06 +01:00
Richard Lau
3b8f3e647a
test: allow EOVERFLOW errors in fs position tests
Some platforms may return `EOVERFLOW` errors instead of `EFBIG`.

PR-URL: https://github.com/nodejs/node/pull/43510
Refs: https://github.com/nodejs/node/pull/42999
Refs: https://github.com/nodejs/node/issues/43509
Reviewed-By: LiviaMedeiros <livia@cirno.name>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-06-22 19:23:01 +01:00
Livia Medeiros
e330b4583c
test: reduce flakiness of test-fs-read-position-validation.mjs
PR-URL: https://github.com/nodejs/node/pull/42999
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-15 15:52:06 +01:00