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: v7.6.2~267 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0fd3b137d9f441b3934e9e0d6af1cbd9195be141;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;