Skip to content

Fixed 32-bit integer overflow in GetInfoAsync() #165

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

Conversation

nefarius
Copy link
Contributor

@nefarius nefarius commented Jun 9, 2022

If you call GetInfoAsync() on a database that exceeds 2 GB you'll encounter the following issue:

Newtonsoft.Json.JsonReaderException: 'JSON integer 5111222718 is too large or small for an Int32. Path 'sizes.file', line 1, position 294.'

This PR simply switches the relevant fields from int to long which fixes the error.

@matteobortolazzo
Copy link
Owner

Thank you!! Do you need a preview package?

@matteobortolazzo matteobortolazzo merged commit 74a593e into matteobortolazzo:dev Jun 12, 2022
@nefarius
Copy link
Contributor Author

Thank you!! Do you need a preview package?

Would be very cool 😎

@matteobortolazzo
Copy link
Owner

Done :) https://www.nuget.org/packages/CouchDB.NET/3.2.0-Preview4

@nefarius nefarius deleted the nefarius/bugfix/get-info-integer-overflow branch June 15, 2022 13:11
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 this pull request may close these issues.

2 participants