Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
Commit4c36d6c
src: fix slice of slice of file-backed Blob
The value for `new_end` was wrong: While the members `start_` and `end_`refer to the entire length of the file, the parameters `start` and `end`are relative to the current slice.The new end would apparently have the current start_ subtracted from it,and the length would possibly overflow when the FdEntry is asked for itssize or when get_reader is called, resulting in a subslice which extendspast the current slice, which shouldn't be possible. Add a CHECK if thishappens, rather than returning data outside the current slice.There aren't any C++ tests for FdEntry, and on the javascript side thereisn't a way to ask the blob handle for its nominal size. That size couldbe a large uint64, which gets converted to int64 to when FileHandle::newis called, which interprets a negative length as unlimited.Fixes:#53908PR-URL:#53972Reviewed-By: Luigi Pinca <luigipinca@gmail.com>Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>Reviewed-By: James M Snell <jasnell@gmail.com>1 parent6ca0cfc commit4c36d6c
File tree
2 files changed
+14
-2
lines changed- src/dataqueue
- test/parallel
2 files changed
+14
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
806 | 806 |
| |
807 | 807 |
| |
808 | 808 |
| |
809 |
| - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
810 | 812 |
| |
811 | 813 |
| |
812 | 814 |
| |
| |||
817 | 819 |
| |
818 | 820 |
| |
819 | 821 |
| |
820 |
| - | |
| 822 | + | |
821 | 823 |
| |
822 | 824 |
| |
823 | 825 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
86 | 86 |
| |
87 | 87 |
| |
88 | 88 |
| |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
89 | 99 |
| |
90 | 100 |
| |
91 | 101 |
| |
|
0 commit comments
Comments
(0)