Commit d3c0d1b
buffer: throw range error before truncating write
The check to determine whether `noAssert` was set to true and thus
whether RangeErrors should be thrown was happening after the write was
truncated to the available size of the buffer. These checks now occur in
the correct order.
Fixes: #5587
PR-URL: #5605
Reviewed-By: Trevor Norris <[email protected]>
Reviewed-By: James M Snell <[email protected]>1 parent cde81b6 commit d3c0d1b
2 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
817 | | - | |
818 | | - | |
819 | 817 | | |
820 | 818 | | |
821 | 819 | | |
822 | 820 | | |
823 | 821 | | |
824 | | - | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1041 | 1051 | | |
1042 | 1052 | | |
1043 | 1053 | | |
| |||
0 commit comments