Commit d1eab2f
authored
Limit async stream read/write lengths (#1588)
The canonical ABI requires that the maximum size of any one stream
operation is `(1 << 28) - 1`, so this commit places that limit on the
runtime implementation. This generally isn't applicable but it does get
used for `stream` without a payload where otherwise the capacity of
vectors is `usize::MAX`, hence large reads/writes.1 parent a4b3eb1 commit d1eab2f
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
379 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
380 | 387 | | |
381 | 388 | | |
382 | 389 | | |
| |||
618 | 625 | | |
619 | 626 | | |
620 | 627 | | |
621 | | - | |
| 628 | + | |
622 | 629 | | |
623 | 630 | | |
624 | 631 | | |
| |||
0 commit comments