From: Dmitry Volyntsev Date: Mon, 24 May 2021 14:17:59 +0000 (+0000) Subject: Fixed integer-overflow in ToInt32(). X-Git-Tag: 0.6.0~19 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=3457c71e2e45fcb01b93925035bae4aa589485fc;p=njs.git Fixed integer-overflow in ToInt32(). error: negation of -2147483648 cannot be represented in type 'int32_t'. Found by OSS-Fuzz. --- diff --git a/src/njs_number.h b/src/njs_number.h index b0f50dc4..53800cda 100644 --- a/src/njs_number.h +++ b/src/njs_number.h @@ -76,7 +76,7 @@ njs_number_to_integer(double num) njs_inline int32_t njs_number_to_int32(double num) { - int32_t r; + uint32_t r; uint64_t v; njs_int_t exp; njs_diyfp_conv_t conv;