Commit Graph

2 Commits

Author SHA1 Message Date
Abdirahim Musse
f0e720a7fa
test: add EOVERFLOW as an allowed error
in test-fs-read-promises-position-validation.mjs

As stated in https://github.com/nodejs/node/issues/50054

This looks like an oversight as
test-fs-read-position-validation.mjs includes
EOVERFLOW as an allowed error.

Fixes https://github.com/nodejs/node/issues/50054

PR-URL: https://github.com/nodejs/node/pull/50128
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2023-10-12 19:13:09 +00:00
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