Skip to content

Commit 3457c71

Browse files
committed
Fixed integer-overflow in ToInt32().
error: negation of -2147483648 cannot be represented in type 'int32_t'. Found by OSS-Fuzz.
1 parent e61cbca commit 3457c71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/njs_number.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ njs_number_to_integer(double num)
7676
njs_inline int32_t
7777
njs_number_to_int32(double num)
7878
{
79-
int32_t r;
79+
uint32_t r;
8080
uint64_t v;
8181
njs_int_t exp;
8282
njs_diyfp_conv_t conv;

0 commit comments

Comments
 (0)