fix integer overflow issue for i386-pc

pull/741/head
longpanda 3 years ago committed by GitHub
parent 97be7b8bfb
commit 2185556dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

Loading…
Cancel
Save