fat: Fix stack corruption on 64 bit due to wrong count type.
On 64 bit platforms a 64 bit size_t was written at the (incorrect) uint32 on the stack, causing the adjacent bytes variable to be clobbered. Because of this, the vectors wouldn't actually be filled with any file data, making the content of files inacessible.
This commit is contained in:
parent
110eea4517
commit
09592b1dcc
@ -1439,7 +1439,7 @@ dosfs_read_pages(fs_volume *_vol, fs_vnode *_node, void *_cookie, off_t pos,
|
||||
|
||||
while (true) {
|
||||
struct file_io_vec fileVecs[8];
|
||||
uint32 fileVecCount = 8;
|
||||
size_t fileVecCount = 8;
|
||||
bool bufferOverflow;
|
||||
size_t bytes = bytesLeft;
|
||||
|
||||
@ -1483,7 +1483,7 @@ dosfs_write_pages(fs_volume *_vol, fs_vnode *_node, void *_cookie, off_t pos,
|
||||
|
||||
while (true) {
|
||||
struct file_io_vec fileVecs[8];
|
||||
uint32 fileVecCount = 8;
|
||||
size_t fileVecCount = 8;
|
||||
bool bufferOverflow;
|
||||
size_t bytes = bytesLeft;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user