dropbox-sdk-dotnet icon indicating copy to clipboard operation
dropbox-sdk-dotnet copied to clipboard

Chunk Upload fails with incorrect_offset on files larger than 2GB

Open itsmeted opened this issue 5 years ago • 1 comments

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.

itsmeted avatar Jun 10 '20 02:06 itsmeted

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

greg-db avatar Jun 10 '20 16:06 greg-db