Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chunk Upload fails with incorrect_offset on files larger than 2GB #122

Open
itsmeted opened this issue Jun 10, 2020 · 1 comment
Open

Chunk Upload fails with incorrect_offset on files larger than 2GB #122

itsmeted opened this issue Jun 10, 2020 · 1 comment

Comments

@itsmeted
Copy link

When calling ChunkUpload with files over 2GB, the line 499 from
dropbox-sdk-dotnet/Examples/SimpleTest/Program.cs overflows due to the following code:

UploadSessionCursor cursor = new UploadSessionCursor(sessionId, (ulong)(chunkSize * idx));

since both chunkSize and idx are ints. This line overflows the int and leads the UploadSessionAppendV2Async call to return invalid_offset. To fix this, chunkSize should be a uint, and idx should be explicitly sized as a ulong.

@greg-db
Copy link
Contributor

greg-db commented Jun 10, 2020

Thanks for the report! I'll ask the team to fix that up.

@connorworley connorworley self-assigned this Jan 4, 2021
@connorworley connorworley mentioned this issue Jan 13, 2021
7 tasks
@connorworley connorworley removed their assignment Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants