From d87636e22df9d5985d0a38219ecc0b47978173e0 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 10 Dec 2016 00:57:39 +0300 Subject: [PATCH] Workaround 'potential multiplication overflow' code defect in de_win (cord) * cord/tests/de_win.c (get_line_rect): Cast (extend) char_height to LONG when multiplied by line (otherwise only the result of the multiplication is extended to LONG implicitly). --- cord/tests/de_win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cord/tests/de_win.c b/cord/tests/de_win.c index 23c1e2a..b36d864 100644 --- a/cord/tests/de_win.c +++ b/cord/tests/de_win.c @@ -164,7 +164,7 @@ int char_height; void get_line_rect(int line, int win_width, RECT * rectp) { - rectp -> top = line * char_height; + rectp -> top = line * (LONG)char_height; rectp -> bottom = rectp->top + char_height; rectp -> left = 0; rectp -> right = win_width; -- 2.7.4