-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alanscut
approved these changes
Oct 16, 2020
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 <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
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 <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit fa00ac0) Signed-off-by: Armin Kuster <akuster808@gmail.com>
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 <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
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 <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
armcc
added a commit
to lgirdk/meta-mng
that referenced
this pull request
Mar 16, 2025
1.7.18 (May 13, 2024) ====== * Add NULL check to cJSON_SetValuestring()(CVE-2024-31755), see #839 and #840 * Remove non-functional list handling of compiler flags, see #851 * Fix heap buffer overflow, see #852 * Remove misused optimization flag -01, see #854 * Set free'd pointers to NULL whenever they are not reassigned immediately after, see #855 and #833 1.7.17 (Dec 26, 2023) ====== * Fix null reference in cJSON_SetValuestring(CVE-2023-50472), see #809 * Fix null reference in cJSON_InsertItemInArray(CVE-2023-50471), see #809 and #810 1.7.16 (Jul 5, 2023) ====== * Add an option for ENABLE_CJSON_VERSION_SO in CMakeLists.txt, see #534 * Add cmake_policy to CMakeLists.txt, see #163 * Add cJSON_SetBoolValue, see #639 * Add meson documentation, see #761 * Fix memory leak in merge_patch, see #611 * Fix conflicting target names 'uninstall', see #617 * Bump cmake version to 3.0 and use new version syntax, see #587 * Print int without decimal places, see #630 * Fix 'cjson_utils-static' target not exist, see #625 * Add allocate check for replace_item_in_object, see #675 * Fix a null pointer crash in cJSON_ReplaceItemViaPointer, see #726 1.7.15 (Aug 25, 2021) ====== * Fix potential core dumped for strrchr, see [#546](DaveGamble/cJSON#546) * Fix null pointer crash in cJSON_CreateXxArray, see [#538](DaveGamble/cJSON#538) * Fix several null pointer problems on allocation failure, see [#526](DaveGamble/cJSON#526) * Fix a possible dereference of null pointer, see [#519](DaveGamble/cJSON#519) * Fix windows build failure about defining nan, see [#518](DaveGamble/cJSON#518) 1.7.14 (Sep 3, 2020) ====== * Optimize the way to find tail node, see [#503](DaveGamble/cJSON#503) * Fix WError error on macosx because NAN is a float. Thanks @sappo, see [#484](DaveGamble/cJSON#484) * Fix some bugs in detach and replace. Thanks @miaoerduo, see [#456](DaveGamble/cJSON#456) Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
armcc
added a commit
to lgirdk/meta-mng
that referenced
this pull request
Mar 30, 2025
1.7.18 (May 13, 2024) ====== * Add NULL check to cJSON_SetValuestring()(CVE-2024-31755), see #839 and #840 * Remove non-functional list handling of compiler flags, see #851 * Fix heap buffer overflow, see #852 * Remove misused optimization flag -01, see #854 * Set free'd pointers to NULL whenever they are not reassigned immediately after, see #855 and #833 1.7.17 (Dec 26, 2023) ====== * Fix null reference in cJSON_SetValuestring(CVE-2023-50472), see #809 * Fix null reference in cJSON_InsertItemInArray(CVE-2023-50471), see #809 and #810 1.7.16 (Jul 5, 2023) ====== * Add an option for ENABLE_CJSON_VERSION_SO in CMakeLists.txt, see #534 * Add cmake_policy to CMakeLists.txt, see #163 * Add cJSON_SetBoolValue, see #639 * Add meson documentation, see #761 * Fix memory leak in merge_patch, see #611 * Fix conflicting target names 'uninstall', see #617 * Bump cmake version to 3.0 and use new version syntax, see #587 * Print int without decimal places, see #630 * Fix 'cjson_utils-static' target not exist, see #625 * Add allocate check for replace_item_in_object, see #675 * Fix a null pointer crash in cJSON_ReplaceItemViaPointer, see #726 1.7.15 (Aug 25, 2021) ====== * Fix potential core dumped for strrchr, see [#546](DaveGamble/cJSON#546) * Fix null pointer crash in cJSON_CreateXxArray, see [#538](DaveGamble/cJSON#538) * Fix several null pointer problems on allocation failure, see [#526](DaveGamble/cJSON#526) * Fix a possible dereference of null pointer, see [#519](DaveGamble/cJSON#519) * Fix windows build failure about defining nan, see [#518](DaveGamble/cJSON#518) 1.7.14 (Sep 3, 2020) ====== * Optimize the way to find tail node, see [#503](DaveGamble/cJSON#503) * Fix WError error on macosx because NAN is a float. Thanks @sappo, see [#484](DaveGamble/cJSON#484) * Fix some bugs in detach and replace. Thanks @miaoerduo, see [#456](DaveGamble/cJSON#456) Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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