]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stats-json: Define JSON_INT_MAX as a signed integer
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Feb 2025 16:13:50 +0000 (17:13 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 6 Feb 2025 16:19:49 +0000 (17:19 +0100)
commitd48b5add889db1bf2f0fae4721abb46413303d33
tree8ec197efa4107c8f184273ea495a5ee3394ebb36
parentbc487afc85fc9c28c14467d9fb5296ad277471c0
BUG/MINOR: stats-json: Define JSON_INT_MAX as a signed integer

A JSON integer is defined in the range [-(2**53)+1, (2**53)-1]. Macro are used
to define the minimum and the maximum value, The minimum one is defined using
the maximum one. So JSON_INT_MAX must be defined as a signed integer value to
avoid wrong cast of JSON_INT_MIN.

It was reported by Coverity in #2841: CID 1587769.

This patch could be backported to all stable versions.
src/stats-json.c