Skip to content
This repository has been archived by the owner on Nov 28, 2021. It is now read-only.

error in NtfsCopy [bug] [fixed] #5

Open
Acebond opened this issue Jul 16, 2021 · 0 comments
Open

error in NtfsCopy [bug] [fixed] #5

Acebond opened this issue Jul 16, 2021 · 0 comments

Comments

@Acebond
Copy link

Acebond commented Jul 16, 2021

Hello
There seems to be a bug in NtfsCopy
https://github.com/LordMike/NtfsLib/blob/master/NtfsCopy/Program.cs#L152

byte[] buff = new byte[65535];
This throws an error when the file is larger than 65535 bytes in size.

The fileStream.Read(buff, 0, buff.Length); function returns a size larger than buff.

I fixed the issues by using a buff size that is divisible by 512. So 65536.

In the screenshot below, I added a print statement for the read() function, which read 65536
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant