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

Int32 overflow due to download counts exceeding int32.maxvalue #176

Open
joelverhagen opened this issue Aug 23, 2022 · 0 comments · May be fixed by #177
Open

Int32 overflow due to download counts exceeding int32.maxvalue #176

joelverhagen opened this issue Aug 23, 2022 · 0 comments · May be fixed by #177

Comments

@joelverhagen
Copy link
Contributor

I've noticed the following where when the search results include a package that has download counts greater than Int32.MaxValue.

Example URL:
https://www.fuget.org/packages?q=newtonsoft.json

System.OverflowException: Value was either too large or too small for an Int32. at System.Convert.ThrowInt32OverflowException() at System.Convert.ToInt32(Int64 value) at System.Int64.System.IConvertible.ToInt32(IFormatProvider provider) at System.Convert.ToInt32(Object value, IFormatProvider provider) at Newtonsoft.Json.Linq.JToken.op_Explicit(JToken value) at FuGetGallery.PackagesSearchResults.Read(String json) in /home/runner/work/FuGetGallery/FuGetGallery/Data/PackagesSearchResults.cs:line 45 at FuGetGallery.PackagesSearchResults.ResultsCache.GetValueAsync(String q, HttpClient httpClient, CancellationToken token) in /home/runner/work/FuGetGallery/FuGetGallery/Data/PackagesSearchResults.cs:line 85

Other search results appear fine:
https://www.fuget.org/packages?q=telerik

Details page works fine:
https://www.fuget.org/packages/Newtonsoft.Json

joelverhagen added a commit to joelverhagen/FuGetGallery that referenced this issue Aug 23, 2022
@joelverhagen joelverhagen linked a pull request Aug 23, 2022 that will close this issue
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.

1 participant