From: Fabrice Bellard Date: Mon, 7 Apr 2025 10:02:01 +0000 (+0200) Subject: Fix UB in BigInt left shift (saghul) X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/stylesheets/print.css?a=commitdiff_plain;h=083b7bab01e8c57ca50927fdf9d3d4d8d45068a4;p=quickjs.git Fix UB in BigInt left shift (saghul) --- diff --git a/quickjs.c b/quickjs.c index ae827ed..702ea8f 100644 --- a/quickjs.c +++ b/quickjs.c @@ -13857,7 +13857,7 @@ static no_inline __exception int js_binary_logic_slow(JSContext *ctx, goto bigint_sar; } bigint_shl: - vd = (js_sdlimb_t)v1 << v2; + vd = (js_dlimb_t)v1 << v2; if (likely(vd >= JS_SHORT_BIG_INT_MIN && vd <= JS_SHORT_BIG_INT_MAX)) { v = vd;