projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e175f3
)
Workaround 'potential multiplication overflow' code defect in de_win (cord)
author
Ivan Maidanski
<ivmai@mail.ru>
Fri, 9 Dec 2016 21:57:39 +0000
(
00:57
+0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Fri, 9 Dec 2016 21:57:39 +0000
(
00:57
+0300)
* 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
patch
|
blob
|
history
diff --git
a/cord/tests/de_win.c
b/cord/tests/de_win.c
index
23c1e2a
..
b36d864
100644
(file)
--- 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;