From 01a160a05de56b8d8037250d28ce1ba4304a036c 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 244c6d8be37685..f691803039e28d 100644 --- a/src/env.cc +++ b/src/env.cc @@ -617,7 +617,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)); }