-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit 6421031
Rollup merge of #143462 - Rudxain:read_to_string_usize, r=joboet
fix(lib-std-fs): handle `usize` overflow in `read*`
I assume this is a non-breaking change, as there would be an OOM `panic` anyways. This patch ensures a fast-fail when there's not enough memory to load the file. This only changes behavior on platforms where `usize` is smaller than 64bits1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
304 | 304 |
| |
305 | 305 |
| |
306 | 306 |
| |
307 | - | ||
307 | + | ||
308 | 308 |
| |
309 | 309 |
| |
310 | 310 |
| |
| |||
346 | 346 |
| |
347 | 347 |
| |
348 | 348 |
| |
349 | - | ||
349 | + | ||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
|
0 commit comments