From 82e71dd8bdbeab01294c933b4b4bf72bd741c222 Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Thu, 9 Aug 2018 07:47:54 -0700 Subject: [PATCH] src: fix integer overflow in GetNow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/22214 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Bradley Farias Reviewed-By: Matheus Marchini Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Luigi Pinca Reviewed-By: Ruben Bridgewater Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum Reviewed-By: Trivikram Kamat --- src/env.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/env.cc b/src/env.cc index bea42aa10774f8..0e9a8772fb2872 100644 --- a/src/env.cc +++ b/src/env.cc @@ -536,7 +536,7 @@ Local Environment::GetNow() { CHECK_GE(now, timer_base()); now -= timer_base(); if (now <= 0xffffffff) - return Integer::New(isolate(), static_cast(now)); + return Integer::NewFromUnsigned(isolate(), static_cast(now)); else return Number::New(isolate(), static_cast(now)); }