]> git.ipfire.org Git - thirdparty/json-c.git/commit
Explicitly handle NaN values when converting to int
authorSimon Resch <simon.resch@code-intelligence.de>
Thu, 14 Nov 2024 12:47:18 +0000 (13:47 +0100)
committerSimon Resch <simon.resch@code-intelligence.de>
Wed, 27 Nov 2024 06:17:20 +0000 (07:17 +0100)
commit8c13801f2c810bdbfacf49c830f060a80e86aa26
treeeef7f14914d87fa4e49fae51d756d1027dc23f66
parent565f181f656439847ef79650caad5c0b6c20171b
Explicitly handle NaN values when converting to int

Json objects of type double with the value NaN could cause undefined
behavior when casting double to int in `json_object_get_int`.
json_object.c
json_object.h
tests/test_cast.c
tests/test_cast.expected
tests/test_int_get.c