From 79a10c06b0a919c7bf72659b7966e01320e24901 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 14 Jan 2020 22:26:22 +0100 Subject: [PATCH] Fixed an unintentional integer overflow in win/win_settings.c. --- src/win/win_settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win/win_settings.c b/src/win/win_settings.c index f47f4f4b1..1b9379306 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -2532,7 +2532,7 @@ static int hdconf_initialize_hdt_combo(HWND hdlg) h = GetDlgItem(hdlg, IDC_COMBO_HD_TYPE); for (i = 0; i < 127; i++) { - temp_size = hdd_table[i][0] * hdd_table[i][1] * hdd_table[i][2]; + temp_size = ((uint64_t) hdd_table[i][0]) * hdd_table[i][1] * hdd_table[i][2]; size_mb = (uint32_t) (temp_size >> 11LL); wsprintf(szText, plat_get_string(IDS_2116), size_mb, hdd_table[i][0], hdd_table[i][1], hdd_table[i][2]); SendMessage(h, CB_ADDSTRING, 0, (LPARAM) szText);