Commit dcefcbc
committed
fs: coerce FileHandle.read length like fs.read
Non-number length values reached node::fs::Read, which CHECKs
IsInt32() and aborts the process. Apply length |= 0 after defaulting,
matching fs.read and fs.readSync.
Signed-off-by: Xia Chao <236466140+bun-unsafe@users.noreply.github.com>1 parent f509cf1 commit dcefcbc
2 files changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
| 1423 | + | |
1423 | 1424 | | |
1424 | 1425 | | |
1425 | 1426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
115 | 136 | | |
116 | 137 | | |
117 | 138 | | |
| |||
144 | 165 | | |
145 | 166 | | |
146 | 167 | | |
| 168 | + | |
147 | 169 | | |
148 | 170 | | |
149 | 171 | | |
0 commit comments