[Bug 38392] New: Divide by zero in dlls/user32/Edit.c source file
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Apr 11 09:40:25 CDT 2015
https://bugs.winehq.org/show_bug.cgi?id=38392
Bug ID: 38392
Summary: Divide by zero in dlls/user32/Edit.c source file
Product: Wine
Version: unspecified
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: user32
Assignee: wine-bugs at winehq.org
Reporter: bur_av at bk.ru
Distribution: ---
Upon calculation of line count in get_vertical_line_count function, line_height
field might take value of 0, which results in division by zero error. E.g. I
encountered this when dynamically creating hidden text control in Clarion
language, which uses WinAPI call for that.
Here's my hotfix for this bug (return 1 if es->line_height <= 0):
{{{
static inline INT get_vertical_line_count(EDITSTATE *es) {
if (es->line_height <=0) {
return 1;
}
else {
INT vlc = (es->format_rect.bottom - es->format_rect.top) / es->line_height;
return max(1,vlc);
}
}
}}}
The problem shows up in WINE versions 1.4.1 - 1.7.40. (at least on CentOS 6,
CentOS 7, Debian 7 and Mint 17).
Please, fix this bug in official release.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list