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: windows build failure about defining nan #518

Merged
merged 1 commit into from
Oct 16, 2020

Conversation

fpnuseis
Copy link
Contributor

@fpnuseis fpnuseis commented Oct 15, 2020

E:\webtob-build\workspace\hth\cJSON.c(109) : error C2124: divide or mod by zero
Defining nan( #define NAN 0.0/0.0) occured windows build failure above.

So, I changed 0.0/0.0 to sqrt(-1.0)

Environment
Windows Server 2008
Visual Studio 9.0

@Alanscut Alanscut merged commit 488169f into DaveGamble:master Oct 16, 2020
@Alanscut
Copy link
Collaborator

thanks!

kraj pushed a commit to YoeDistro/meta-openembedded that referenced this pull request Sep 6, 2021
Fixes:
Fix potential core dumped for strrchr, see DaveGamble/cJSON#546
Fix null pointer crash in cJSON_CreateXxArray, see DaveGamble/cJSON#538
Fix several null pointer problems on allocation failure, see DaveGamble/cJSON#526
Fix a possible dereference of null pointer, see DaveGamble/cJSON#519
Fix windows build failure about defining nan, see DaveGamble/cJSON#518

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
halstead pushed a commit to openembedded/meta-openembedded that referenced this pull request Sep 17, 2021
Fixes:
Fix potential core dumped for strrchr, see DaveGamble/cJSON#546
Fix null pointer crash in cJSON_CreateXxArray, see DaveGamble/cJSON#538
Fix several null pointer problems on allocation failure, see DaveGamble/cJSON#526
Fix a possible dereference of null pointer, see DaveGamble/cJSON#519
Fix windows build failure about defining nan, see DaveGamble/cJSON#518

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit fa00ac0)
Signed-off-by: Armin Kuster <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
Fixes:
Fix potential core dumped for strrchr, see DaveGamble/cJSON#546
Fix null pointer crash in cJSON_CreateXxArray, see DaveGamble/cJSON#538
Fix several null pointer problems on allocation failure, see DaveGamble/cJSON#526
Fix a possible dereference of null pointer, see DaveGamble/cJSON#519
Fix windows build failure about defining nan, see DaveGamble/cJSON#518

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
daregit pushed a commit to daregit/yocto-combined that referenced this pull request May 22, 2024
Fixes:
Fix potential core dumped for strrchr, see DaveGamble/cJSON#546
Fix null pointer crash in cJSON_CreateXxArray, see DaveGamble/cJSON#538
Fix several null pointer problems on allocation failure, see DaveGamble/cJSON#526
Fix a possible dereference of null pointer, see DaveGamble/cJSON#519
Fix windows build failure about defining nan, see DaveGamble/cJSON#518

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
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