summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-10-08 16:11:32 +0530
committerGitHub <noreply@github.com>2024-10-08 10:41:32 +0000
commitff4e682ff95af37b52c404d694ffcfcfa57bb127 (patch)
treea14e6b7af1b494393796a7eac56fbc3ca3ac8927 /ext/node/polyfills/_fs
parent2d488e4bfb9ffdfd2d043cc4bba9e6037b4cc24e (diff)
fix(ext/node): internal buffer length in readSync (#26064)
Closes https://github.com/denoland/deno/issues/26054
Diffstat (limited to 'ext/node/polyfills/_fs')
-rw-r--r--ext/node/polyfills/_fs/_fs_read.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/_fs/_fs_read.ts b/ext/node/polyfills/_fs/_fs_read.ts
index dec3a8bbd..df4f5e375 100644
--- a/ext/node/polyfills/_fs/_fs_read.ts
+++ b/ext/node/polyfills/_fs/_fs_read.ts
@@ -173,7 +173,7 @@ export function readSync(
validateBuffer(buffer);
if (length == null) {
- length = 0;
+ length = buffer.byteLength;
}
if (typeof offsetOrOpt === "number") {