summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-04-07 12:02:01 +0200
committerFabrice Bellard <fabrice@bellard.org>2025-04-07 12:02:01 +0200
commit083b7bab01e8c57ca50927fdf9d3d4d8d45068a4 (patch)
treefa19b0c2bc6874ed614089248ca4df3a733f60af /quickjs.c
parentfa706d5622c857c5531b049bbd3e2723df8a4514 (diff)
downloadquickjs-083b7bab01e8c57ca50927fdf9d3d4d8d45068a4.tar.gz
quickjs-083b7bab01e8c57ca50927fdf9d3d4d8d45068a4.zip
Fix UB in BigInt left shift (saghul)
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c2
1 files changed, 1 insertions, 1 deletions
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;