From: Ivan Maidanski Date: Fri, 9 Dec 2016 21:57:39 +0000 (+0300) Subject: Workaround 'potential multiplication overflow' code defect in de_win (cord) X-Git-Tag: v8.0.0~998 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d87636e22df9d5985d0a38219ecc0b47978173e0;p=gc 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). --- diff --git a/cord/tests/de_win.c b/cord/tests/de_win.c index 23c1e2a1..b36d864c 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;