From 3457c71e2e45fcb01b93925035bae4aa589485fc Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Mon, 24 May 2021 14:17:59 +0000 Subject: [PATCH] Fixed integer-overflow in ToInt32(). error: negation of -2147483648 cannot be represented in type 'int32_t'. Found by OSS-Fuzz. --- src/njs_number.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3