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

fix Arithmetic overflow #204

Merged
merged 2 commits into from
May 21, 2023
Merged

fix Arithmetic overflow #204

merged 2 commits into from
May 21, 2023

Conversation

vaavva
Copy link
Contributor

@vaavva vaavva commented May 1, 2023

We're getting the following warning:
Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).

This PR resolves the warning by making 0.7 a double instead of a float.

@vaavva
Copy link
Contributor Author

vaavva commented May 3, 2023

@kgabis could you please take a look at this one-line change?

parson.c Outdated Show resolved Hide resolved
@kgabis
Copy link
Owner

kgabis commented May 4, 2023

I'm on holiday, I won't be able to merge it before Monday. In the meantime please increment patch version and change https://github.com/kgabis/parson/pull/204/files#r1184870569.

Since you work at Microsoft, could you contact me with someone responsible for open source? Few weeks ago I applied for Azure credits to test parson on windows and still didn't receive any reply. Also, Microsoft has been using parson for years now and I've provided continuous support for various PRs and bugfixes so I wanted to discuss Microsoft becoming a sponsor but I couldn't find a way to contact anyone about it.

@vaavva
Copy link
Contributor Author

vaavva commented May 4, 2023

Unfortunately, I don't have any more information internally than you can find externally about open source contacts, sorry!
I updated the patch version and made the change you suggested, thanks for taking a look at this!

@vaavva
Copy link
Contributor Author

vaavva commented May 10, 2023

@kgabis Is there anything else I need to do for the patch version?

@kgabis kgabis merged commit 60c3784 into kgabis:master May 21, 2023
@kgabis
Copy link
Owner

kgabis commented May 21, 2023

Done :)

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