Changes between Version 3 and Version 4 of Ticket #76, comment 10
- Timestamp:
- Feb 2, 2020, 4:13:30 PM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #76, comment 10
v3 v4 1 1 r218: 2 2 VBoxFS.cpp, "GetEmptyEAs": 3 the allocated buffer length for pFeal is too small. You have to precompute how large that buffer will be by cycling through the pGeal list and computing FEA structure + filename length for each entry to return in FEAList and summing up. Once you know that full length you can then allocate the pFeal structure. You will need to ensure that this value does not exceed the initial value of pFEAList->cbList .3 the allocated buffer length for pFeal is too small. You have to precompute how large that buffer will be by cycling through the pGeal list and computing FEA structure + filename length for each entry to return in FEAList and summing up. Once you know that full length you can then allocate the pFeal structure. You will need to ensure that this value does not exceed the initial value of pFEAList->cbList-4 (where the 4 is for the 4 bytes of the cbList field itself. As an alternative you can start with an initial length count of 4 and compare to pFEAList->cbList directly). 4 4 You might even want to count the number of EAs that you can handle while in the summing up loop described above by always comparing against pFEAList->cbList on each loop iteration. 5 5 Once this is all done you can generate FEAlist and use KernCopyOut to copy your populated FEAList to the original address in user space. You can then even conveniently take the length value that you summed up in your GEA checking loop.