"vscode:/vscode.git/clone" did not exist on "80407b0493846dc498a51ae110ced4f53344bb37"
Unverified Commit 2185556d authored by longpanda's avatar longpanda Committed by GitHub
Browse files

fix integer overflow issue for i386-pc

parent 97be7b8b
......@@ -553,7 +553,7 @@ static grub_err_t ventoy_cmd_mod(grub_extcmd_context_t ctxt, int argc, char **ar
value1 = grub_strtoull(args[0], NULL, 10);
value2 = grub_strtoull(args[1], NULL, 10);
grub_snprintf(buf, sizeof(buf), "%llu", (value1 % value2));
grub_snprintf(buf, sizeof(buf), "%llu", (value1 & (value2 - 1)));
grub_env_set(args[2], buf);
VENTOY_CMD_RETURN(GRUB_ERR_NONE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment